1 |
commit: 4a898bb77d04e01e132bd1cd37bfc8b0e437467c |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 23 17:46:20 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 23 18:10:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a898bb7 |
7 |
|
8 |
dev-libs/openssl: drop old |
9 |
|
10 |
Package-Manager: Portage-2.3.72, Repoman-2.3.17 |
11 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
12 |
|
13 |
dev-libs/openssl/Manifest | 11 - |
14 |
.../files/openssl-1.1.1b-CVE-2019-1543.patch | 66 ----- |
15 |
.../files/openssl-1.1.1b-ec-curves-patch.patch | 207 -------------- |
16 |
dev-libs/openssl/openssl-1.1.0j-r1.ebuild | 299 --------------------- |
17 |
dev-libs/openssl/openssl-1.1.1b-r2.ebuild | 299 --------------------- |
18 |
5 files changed, 882 deletions(-) |
19 |
|
20 |
diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest |
21 |
index 5f6b9b90602..4322efaa3ab 100644 |
22 |
--- a/dev-libs/openssl/Manifest |
23 |
+++ b/dev-libs/openssl/Manifest |
24 |
@@ -7,18 +7,7 @@ DIST openssl-1.0.2s.tar.gz 5349149 BLAKE2B 46c72dcceb5b473b129be0a895f3d6c25a24e |
25 |
DIST openssl-1.0.2s_ec_curve.c 17254 BLAKE2B d40d8d6e770443f07abe70e2c4ddda6aec1cc8e37dc1f226a3fdd9ed5d228f09c6d372e8956b1948b55ee1d57d1429493e7288d0f54d9466a37fec805c85aacb SHA512 8e92fb100bcf4bd918c82b9a6cbd75a55abe1a2c08230a007e441c51577f974f8cc336e9ac8a672b32641480428ca8cead5380da1fe81bacb088145a1b754a15 |
26 |
DIST openssl-1.0.2s_ectest.c 30735 BLAKE2B 95333a27f1cf0a4305a3cee7f6d46b9d4673582ca9acfcf5ba2a0d9d317ab6219cd0d2ff0ba3a55a317c8f5819342f05cc17ba80ec2c92b2b4cab9a3552382e1 SHA512 f2e4d34327b490bc8371f0845c69df3f9fc51ea16f0ea0de0411a0c1fa9d49bb2b6fafc363eb3b3cd919dc7c24e4a0d075c6ff878c01d70dae918f2540874c19 |
27 |
DIST openssl-1.0.2s_hobble-openssl 1302 BLAKE2B 647caa6a0f4c53a2e77baa3b8e5961eaef3bb0ff38e7d5475eab8deef3439f7fe49028ec9ed0406f3453870b62cac67c496b3a048ee4c9ff4c6866d520235960 SHA512 3d757a4708e74a03dd5cb9b8114dfe442ed9520739a6eca693be4c4265771696f1449ea06d1c9bcfc6e94fc9b0dd0c10e153f1c3b0334831c0550b36cd63326e |
28 |
-DIST openssl-1.1.0-build_d2ede125556ac99aa0faa7744c703af3f559094e.patch 3001 BLAKE2B 8f0ac4be6409b4ec50bec171697da2aebe2688e8ae06bd0dfac8b0c74661d38ebeb0a12bde0ef941b213eee9b85965262213b140636060285dcfb02a3bd14961 SHA512 ec6710e9669ac19e4c6f1286c89a383e7d276a773a2740037f98a8f2dbf18305614e7d30d9ed530923a0e7d10a3776fea2ca77229adc25df13ecad55589a3673 |
29 |
-DIST openssl-1.1.0-ec-curves_d2ede125556ac99aa0faa7744c703af3f559094e.patch 5311 BLAKE2B e9ec985adf6f13eb04412158a05da7cbe10be7d64bce73b899152ea379336ece7b7069089ef46993ac301ef850fd46fd0352898e249b2ea9fff5baf20896e5b5 SHA512 c38c4b05195f2b323a07efd8d17335ba2a168a16a59d7941da36568081f1c043da8d2216b7084b0617963635ded9bafeee736ecddbfa251cf0a02e4cba64cdc8 |
30 |
-DIST openssl-1.1.0j.tar.gz 5411919 BLAKE2B 0fbd936f38d30b64bea717a67cd59704c5ce44ee19f377a820f89ba66b9e0a7509cf39e0fb00c104ae6440a6bd811e388239b458ffe685d8601235bab2afb2f1 SHA512 e7d30951ebb3cbcb6d59e3eb40f64f5a84634b7f5c380a588d378973f1c415395e3ab71a9aaff6478a89ec6efcc88f17f1882c99c25dcd18165f1435a51e5768 |
31 |
-DIST openssl-1.1.0j_d2ede125556ac99aa0faa7744c703af3f559094e_ec_curve.c 18401 BLAKE2B f969071ac1b5d0e43b50d54e50b5c4d9201fc8b94458902e9849f14841b5505a2e43ed57a8c13255f042a211af9ee904776c155c36da838a8ad22e1052b02bc1 SHA512 a1c2bb3c3e3d342bddc8c952985e87fc4bad2e8142d5d760b18f346c44c20f00db61c4856f3dcf879b2098e0c036330762915f65d80a1a2cba717d2caeb95457 |
32 |
-DIST openssl-1.1.0j_d2ede125556ac99aa0faa7744c703af3f559094e_ectest.c 30688 BLAKE2B 6673ef0fd139af82d830794179b19b9e06be25fac4a13b8bdfa5fd5dad25f594ce8eab118aab9ec2aab25001e1de127c03f8e1a04f4f3ef4c464b7fb1811ed4a SHA512 240fc72916caf4a8b0af774ce307abfe9a93a762eba6fae760cec79d619fe3db0d6919fc92a8951cb031f73958237700b45f590aa7f9f2890762cccda1f1e74b |
33 |
-DIST openssl-1.1.0j_d2ede125556ac99aa0faa7744c703af3f559094e_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826 |
34 |
DIST openssl-1.1.0k-bindist-1.0.tar.xz 11716 BLAKE2B c491ba0899c44dbcc63f85b255548c439c965a20a04ac2a6324a4122c4691b7c95ec18e62be6d708a7ea62ea197d32e5091987cb5043969878f89e5bc26243d4 SHA512 1d5bc9d7b24cf55d32d996e2421d43a1218b605720293f00d07814afb481387856f0dc000ad3c3e4cba2361055668cfe79a945be44ab85a249555f37e683a909 |
35 |
DIST openssl-1.1.0k.tar.gz 5287321 BLAKE2B fce40a399f5a08d5fe183dfcaab11b211d982885fb9888b25fa41bdd9919ecd203fca6f573363cfb42c9a0776ae69ea50b0f144227a3f28ca0dbadf878d396bc SHA512 65f41a240a97d79504c0e1391fde8ac8692f0993437cdc35e4bc964ecc36e5ef75a62499c4c6cb4ce63f892135e06dba2d3594c8869d935554296fa3c6ccd822 |
36 |
-DIST openssl-1.1.1-ec-curves.patch 7265 BLAKE2B 04725d226c430132cf54afbfaa30a82f8f8bbfd3608823d1d0cd42c3c13f417e90762759da3134d7b0c4373e531925db337b681340f2f284cb2f16a4caef22e3 SHA512 de4d0f1635740c57217836a476c420141c0d34a5f90cbf7957aed7a80e7ac9ca036de2d8448e6bf4c122999e308730575899f61cea6e51ab6825dd04890d75a1 |
37 |
-DIST openssl-1.1.1b.tar.gz 8213737 BLAKE2B 7ad9da9548052e2a033a684038f97c420cfffd57994604bcb3fa12640796c8c0aea3d24fb05648ee4940fbec40b81462e81c353da5a41a2575c0585d9718eae8 SHA512 b54025fbb4fe264466f3b0d762aad4be45bd23cd48bdb26d901d4c41a40bfd776177e02230995ab181a695435039dbad313f4b9a563239a70807a2e19ecf045d |
38 |
-DIST openssl-1.1.1b_ec_curve.c 17938 BLAKE2B d5cbde40dcd8608087aed6ffa9feb040ffadecf0c46b7f3978cc468a9503f0a5ad0a426ea6f8db56f49a64474a508bebdf946e01ebf09adc727675f3b180bcdc SHA512 ec470f6514cb9a4f680b8cbbe02e2bbe71639b288f3429d976726047901d9c50377dfb2737f32429da2fb0e52fd67878a86debb54520e307ee196d97b5c66415 |
39 |
-DIST openssl-1.1.1b_ectest.c 35091 BLAKE2B a9602255ab529751c2af2419206ce113f03f93b7b776691ea2ec550f26ddbecd241844bb81dc86988fdbb1c0a587318f82ce4faecba1a6142a19cf08d40fb2c5 SHA512 7813d9b6b7ab62119a7f2dd5431c17c5839f4c320ac7071b0714c9b8528bda5fda779dbb263328dca6ee8446e9fa09c663da659c9a82832a65cf53d1cd8a4cef |
40 |
-DIST openssl-1.1.1b_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826 |
41 |
DIST openssl-1.1.1c-bindist-1.0.tar.xz 11964 BLAKE2B 8c5190846d13984589a150089d329bb3ecc613788b9462c6f6a1833a040e21cb9bf940140449f09fd797c0e396b0aea073237be374bd16097795b8974c3e7ce5 SHA512 249c6d8c455130b98e3be635f12f323e0cc349f1770648bad591e5de15483917185a473c162ed871a2fa05b47056931e6f12e5fdd9cecee7e6d1c246b862923b |
42 |
DIST openssl-1.1.1c.tar.gz 8864262 BLAKE2B bd157b244bedcefb8e646a743732945119b267236789ac69c38856570318aca09299bdaaea3f20294863b633e6fd4dfe124820597185b3b7461cfdf094daadb0 SHA512 8e2c5cc11c120efbb7d7850980cb6eaa782d29b4996b3f3378d37613c1679f852d7cc08a90d62e78fcec3439f06bdbee70064579a8c2adaffd91532a97f646ff |
43 |
|
44 |
diff --git a/dev-libs/openssl/files/openssl-1.1.1b-CVE-2019-1543.patch b/dev-libs/openssl/files/openssl-1.1.1b-CVE-2019-1543.patch |
45 |
deleted file mode 100644 |
46 |
index 4d478c484c9..00000000000 |
47 |
--- a/dev-libs/openssl/files/openssl-1.1.1b-CVE-2019-1543.patch |
48 |
+++ /dev/null |
49 |
@@ -1,66 +0,0 @@ |
50 |
-From f426625b6ae9a7831010750490a5f0ad689c5ba3 Mon Sep 17 00:00:00 2001 |
51 |
-From: Matt Caswell <matt@×××××××.org> |
52 |
-Date: Tue, 5 Mar 2019 14:39:15 +0000 |
53 |
-Subject: [PATCH] Prevent over long nonces in ChaCha20-Poly1305 |
54 |
- |
55 |
-ChaCha20-Poly1305 is an AEAD cipher, and requires a unique nonce input for |
56 |
-every encryption operation. RFC 7539 specifies that the nonce value (IV) |
57 |
-should be 96 bits (12 bytes). OpenSSL allows a variable nonce length and |
58 |
-front pads the nonce with 0 bytes if it is less than 12 bytes. However it |
59 |
-also incorrectly allows a nonce to be set of up to 16 bytes. In this case |
60 |
-only the last 12 bytes are significant and any additional leading bytes are |
61 |
-ignored. |
62 |
- |
63 |
-It is a requirement of using this cipher that nonce values are unique. |
64 |
-Messages encrypted using a reused nonce value are susceptible to serious |
65 |
-confidentiality and integrity attacks. If an application changes the |
66 |
-default nonce length to be longer than 12 bytes and then makes a change to |
67 |
-the leading bytes of the nonce expecting the new value to be a new unique |
68 |
-nonce then such an application could inadvertently encrypt messages with a |
69 |
-reused nonce. |
70 |
- |
71 |
-Additionally the ignored bytes in a long nonce are not covered by the |
72 |
-integrity guarantee of this cipher. Any application that relies on the |
73 |
-integrity of these ignored leading bytes of a long nonce may be further |
74 |
-affected. |
75 |
- |
76 |
-Any OpenSSL internal use of this cipher, including in SSL/TLS, is safe |
77 |
-because no such use sets such a long nonce value. However user |
78 |
-applications that use this cipher directly and set a non-default nonce |
79 |
-length to be longer than 12 bytes may be vulnerable. |
80 |
- |
81 |
-CVE-2019-1543 |
82 |
- |
83 |
-Fixes #8345 |
84 |
- |
85 |
-Reviewed-by: Paul Dale <paul.dale@××××××.com> |
86 |
-Reviewed-by: Richard Levitte <levitte@×××××××.org> |
87 |
-(Merged from https://github.com/openssl/openssl/pull/8406) |
88 |
- |
89 |
-(cherry picked from commit 2a3d0ee9d59156c48973592331404471aca886d6) |
90 |
---- |
91 |
- crypto/evp/e_chacha20_poly1305.c | 4 +++- |
92 |
- 1 file changed, 3 insertions(+), 1 deletion(-) |
93 |
- |
94 |
-diff --git a/crypto/evp/e_chacha20_poly1305.c b/crypto/evp/e_chacha20_poly1305.c |
95 |
-index c1917bb86a6..d3e2c622a1b 100644 |
96 |
---- a/crypto/evp/e_chacha20_poly1305.c |
97 |
-+++ b/crypto/evp/e_chacha20_poly1305.c |
98 |
-@@ -30,6 +30,8 @@ typedef struct { |
99 |
- |
100 |
- #define data(ctx) ((EVP_CHACHA_KEY *)(ctx)->cipher_data) |
101 |
- |
102 |
-+#define CHACHA20_POLY1305_MAX_IVLEN 12 |
103 |
-+ |
104 |
- static int chacha_init_key(EVP_CIPHER_CTX *ctx, |
105 |
- const unsigned char user_key[CHACHA_KEY_SIZE], |
106 |
- const unsigned char iv[CHACHA_CTR_SIZE], int enc) |
107 |
-@@ -533,7 +535,7 @@ static int chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, |
108 |
- return 1; |
109 |
- |
110 |
- case EVP_CTRL_AEAD_SET_IVLEN: |
111 |
-- if (arg <= 0 || arg > CHACHA_CTR_SIZE) |
112 |
-+ if (arg <= 0 || arg > CHACHA20_POLY1305_MAX_IVLEN) |
113 |
- return 0; |
114 |
- actx->nonce_len = arg; |
115 |
- return 1; |
116 |
|
117 |
diff --git a/dev-libs/openssl/files/openssl-1.1.1b-ec-curves-patch.patch b/dev-libs/openssl/files/openssl-1.1.1b-ec-curves-patch.patch |
118 |
deleted file mode 100644 |
119 |
index c1f53c83823..00000000000 |
120 |
--- a/dev-libs/openssl/files/openssl-1.1.1b-ec-curves-patch.patch |
121 |
+++ /dev/null |
122 |
@@ -1,207 +0,0 @@ |
123 |
-Based on openssl-1.1.1-ec-curves.patch. |
124 |
- |
125 |
-Updated for OpenSSL change b6d41ff73392df5af9c931c902ae4cd75c5b61ea. |
126 |
- |
127 |
---- a/apps/speed.c |
128 |
-+++ b/apps/speed.c |
129 |
-@@ -489,82 +489,28 @@ static const OPT_PAIR rsa_choices[] = { |
130 |
- static double rsa_results[RSA_NUM][2]; /* 2 ops: sign then verify */ |
131 |
- #endif /* OPENSSL_NO_RSA */ |
132 |
- |
133 |
--#define R_EC_P160 0 |
134 |
--#define R_EC_P192 1 |
135 |
--#define R_EC_P224 2 |
136 |
--#define R_EC_P256 3 |
137 |
--#define R_EC_P384 4 |
138 |
--#define R_EC_P521 5 |
139 |
--#define R_EC_K163 6 |
140 |
--#define R_EC_K233 7 |
141 |
--#define R_EC_K283 8 |
142 |
--#define R_EC_K409 9 |
143 |
--#define R_EC_K571 10 |
144 |
--#define R_EC_B163 11 |
145 |
--#define R_EC_B233 12 |
146 |
--#define R_EC_B283 13 |
147 |
--#define R_EC_B409 14 |
148 |
--#define R_EC_B571 15 |
149 |
--#define R_EC_BRP256R1 16 |
150 |
--#define R_EC_BRP256T1 17 |
151 |
--#define R_EC_BRP384R1 18 |
152 |
--#define R_EC_BRP384T1 19 |
153 |
--#define R_EC_BRP512R1 20 |
154 |
--#define R_EC_BRP512T1 21 |
155 |
--#define R_EC_X25519 22 |
156 |
--#define R_EC_X448 23 |
157 |
-+#define R_EC_P224 0 |
158 |
-+#define R_EC_P256 1 |
159 |
-+#define R_EC_P384 2 |
160 |
-+#define R_EC_P521 3 |
161 |
-+#define R_EC_X25519 4 |
162 |
-+#define R_EC_X448 5 |
163 |
- #ifndef OPENSSL_NO_EC |
164 |
- static OPT_PAIR ecdsa_choices[] = { |
165 |
-- {"ecdsap160", R_EC_P160}, |
166 |
-- {"ecdsap192", R_EC_P192}, |
167 |
- {"ecdsap224", R_EC_P224}, |
168 |
- {"ecdsap256", R_EC_P256}, |
169 |
- {"ecdsap384", R_EC_P384}, |
170 |
- {"ecdsap521", R_EC_P521}, |
171 |
-- {"ecdsak163", R_EC_K163}, |
172 |
-- {"ecdsak233", R_EC_K233}, |
173 |
-- {"ecdsak283", R_EC_K283}, |
174 |
-- {"ecdsak409", R_EC_K409}, |
175 |
-- {"ecdsak571", R_EC_K571}, |
176 |
-- {"ecdsab163", R_EC_B163}, |
177 |
-- {"ecdsab233", R_EC_B233}, |
178 |
-- {"ecdsab283", R_EC_B283}, |
179 |
-- {"ecdsab409", R_EC_B409}, |
180 |
-- {"ecdsab571", R_EC_B571}, |
181 |
-- {"ecdsabrp256r1", R_EC_BRP256R1}, |
182 |
-- {"ecdsabrp256t1", R_EC_BRP256T1}, |
183 |
-- {"ecdsabrp384r1", R_EC_BRP384R1}, |
184 |
-- {"ecdsabrp384t1", R_EC_BRP384T1}, |
185 |
-- {"ecdsabrp512r1", R_EC_BRP512R1}, |
186 |
-- {"ecdsabrp512t1", R_EC_BRP512T1} |
187 |
- }; |
188 |
- # define ECDSA_NUM OSSL_NELEM(ecdsa_choices) |
189 |
- |
190 |
- static double ecdsa_results[ECDSA_NUM][2]; /* 2 ops: sign then verify */ |
191 |
- |
192 |
- static const OPT_PAIR ecdh_choices[] = { |
193 |
-- {"ecdhp160", R_EC_P160}, |
194 |
-- {"ecdhp192", R_EC_P192}, |
195 |
- {"ecdhp224", R_EC_P224}, |
196 |
- {"ecdhp256", R_EC_P256}, |
197 |
- {"ecdhp384", R_EC_P384}, |
198 |
- {"ecdhp521", R_EC_P521}, |
199 |
-- {"ecdhk163", R_EC_K163}, |
200 |
-- {"ecdhk233", R_EC_K233}, |
201 |
-- {"ecdhk283", R_EC_K283}, |
202 |
-- {"ecdhk409", R_EC_K409}, |
203 |
-- {"ecdhk571", R_EC_K571}, |
204 |
-- {"ecdhb163", R_EC_B163}, |
205 |
-- {"ecdhb233", R_EC_B233}, |
206 |
-- {"ecdhb283", R_EC_B283}, |
207 |
-- {"ecdhb409", R_EC_B409}, |
208 |
-- {"ecdhb571", R_EC_B571}, |
209 |
-- {"ecdhbrp256r1", R_EC_BRP256R1}, |
210 |
-- {"ecdhbrp256t1", R_EC_BRP256T1}, |
211 |
-- {"ecdhbrp384r1", R_EC_BRP384R1}, |
212 |
-- {"ecdhbrp384t1", R_EC_BRP384T1}, |
213 |
-- {"ecdhbrp512r1", R_EC_BRP512R1}, |
214 |
-- {"ecdhbrp512t1", R_EC_BRP512T1}, |
215 |
- {"ecdhx25519", R_EC_X25519}, |
216 |
- {"ecdhx448", R_EC_X448} |
217 |
- }; |
218 |
-@@ -1495,29 +1441,10 @@ int speed_main(int argc, char **argv) |
219 |
- unsigned int bits; |
220 |
- } test_curves[] = { |
221 |
- /* Prime Curves */ |
222 |
-- {"secp160r1", NID_secp160r1, 160}, |
223 |
-- {"nistp192", NID_X9_62_prime192v1, 192}, |
224 |
- {"nistp224", NID_secp224r1, 224}, |
225 |
- {"nistp256", NID_X9_62_prime256v1, 256}, |
226 |
- {"nistp384", NID_secp384r1, 384}, |
227 |
- {"nistp521", NID_secp521r1, 521}, |
228 |
-- /* Binary Curves */ |
229 |
-- {"nistk163", NID_sect163k1, 163}, |
230 |
-- {"nistk233", NID_sect233k1, 233}, |
231 |
-- {"nistk283", NID_sect283k1, 283}, |
232 |
-- {"nistk409", NID_sect409k1, 409}, |
233 |
-- {"nistk571", NID_sect571k1, 571}, |
234 |
-- {"nistb163", NID_sect163r2, 163}, |
235 |
-- {"nistb233", NID_sect233r1, 233}, |
236 |
-- {"nistb283", NID_sect283r1, 283}, |
237 |
-- {"nistb409", NID_sect409r1, 409}, |
238 |
-- {"nistb571", NID_sect571r1, 571}, |
239 |
-- {"brainpoolP256r1", NID_brainpoolP256r1, 256}, |
240 |
-- {"brainpoolP256t1", NID_brainpoolP256t1, 256}, |
241 |
-- {"brainpoolP384r1", NID_brainpoolP384r1, 384}, |
242 |
-- {"brainpoolP384t1", NID_brainpoolP384t1, 384}, |
243 |
-- {"brainpoolP512r1", NID_brainpoolP512r1, 512}, |
244 |
-- {"brainpoolP512t1", NID_brainpoolP512t1, 512}, |
245 |
- /* Other and ECDH only ones */ |
246 |
- {"X25519", NID_X25519, 253}, |
247 |
- {"X448", NID_X448, 448} |
248 |
-@@ -2017,9 +1944,9 @@ int speed_main(int argc, char **argv) |
249 |
- # endif |
250 |
- |
251 |
- # ifndef OPENSSL_NO_EC |
252 |
-- ecdsa_c[R_EC_P160][0] = count / 1000; |
253 |
-- ecdsa_c[R_EC_P160][1] = count / 1000 / 2; |
254 |
-- for (i = R_EC_P192; i <= R_EC_P521; i++) { |
255 |
-+ ecdsa_c[R_EC_P224][0] = count / 1000; |
256 |
-+ ecdsa_c[R_EC_P224][1] = count / 1000 / 2; |
257 |
-+ for (i = R_EC_P256; i <= R_EC_P521; i++) { |
258 |
- ecdsa_c[i][0] = ecdsa_c[i - 1][0] / 2; |
259 |
- ecdsa_c[i][1] = ecdsa_c[i - 1][1] / 2; |
260 |
- if (ecdsa_doit[i] <= 1 && ecdsa_c[i][0] == 0) |
261 |
-@@ -2031,6 +1958,7 @@ int speed_main(int argc, char **argv) |
262 |
- } |
263 |
- } |
264 |
- } |
265 |
-+#if 0 |
266 |
- ecdsa_c[R_EC_K163][0] = count / 1000; |
267 |
- ecdsa_c[R_EC_K163][1] = count / 1000 / 2; |
268 |
- for (i = R_EC_K233; i <= R_EC_K571; i++) { |
269 |
-@@ -2059,9 +1987,9 @@ int speed_main(int argc, char **argv) |
270 |
- } |
271 |
- } |
272 |
- } |
273 |
-- |
274 |
-- ecdh_c[R_EC_P160][0] = count / 1000; |
275 |
-- for (i = R_EC_P192; i <= R_EC_P521; i++) { |
276 |
-+#endif |
277 |
-+ ecdh_c[R_EC_P224][0] = count / 1000; |
278 |
-+ for (i = R_EC_P256; i <= R_EC_P521; i++) { |
279 |
- ecdh_c[i][0] = ecdh_c[i - 1][0] / 2; |
280 |
- if (ecdh_doit[i] <= 1 && ecdh_c[i][0] == 0) |
281 |
- ecdh_doit[i] = 0; |
282 |
-@@ -2071,6 +1999,7 @@ int speed_main(int argc, char **argv) |
283 |
- } |
284 |
- } |
285 |
- } |
286 |
-+#if 0 |
287 |
- ecdh_c[R_EC_K163][0] = count / 1000; |
288 |
- for (i = R_EC_K233; i <= R_EC_K571; i++) { |
289 |
- ecdh_c[i][0] = ecdh_c[i - 1][0] / 2; |
290 |
-@@ -2116,6 +2045,7 @@ int speed_main(int argc, char **argv) |
291 |
- } |
292 |
- } |
293 |
- } |
294 |
-+#endif |
295 |
- /* default iteration count for the last two EC Curves */ |
296 |
- ecdh_c[R_EC_X25519][0] = count / 1800; |
297 |
- ecdh_c[R_EC_X448][0] = count / 7200; |
298 |
---- a/crypto/ec/ecp_smpl.c |
299 |
-+++ b/crypto/ec/ecp_smpl.c |
300 |
-@@ -145,6 +145,11 @@ int ec_GFp_simple_group_set_curve(EC_GROUP *group, |
301 |
- return 0; |
302 |
- } |
303 |
- |
304 |
-+ if (BN_num_bits(p) < 224) { |
305 |
-+ ECerr(EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE, EC_R_UNSUPPORTED_FIELD); |
306 |
-+ return 0; |
307 |
-+ } |
308 |
-+ |
309 |
- if (ctx == NULL) { |
310 |
- ctx = new_ctx = BN_CTX_new(); |
311 |
- if (ctx == NULL) |
312 |
---- a/test/ecdsatest.c |
313 |
-+++ b/test/ecdsatest.c |
314 |
-@@ -176,6 +176,7 @@ static int x9_62_tests(void) |
315 |
- if (!change_rand()) |
316 |
- goto x962_err; |
317 |
- |
318 |
-+#if 0 |
319 |
- if (!TEST_true(x9_62_test_internal(NID_X9_62_prime192v1, |
320 |
- "3342403536405981729393488334694600415596881826869351677613", |
321 |
- "5735822328888155254683894997897571951568553642892029982342"))) |
322 |
-@@ -186,6 +187,7 @@ static int x9_62_tests(void) |
323 |
- "3238135532097973577080787768312505059318910517550078427819" |
324 |
- "78505179448783"))) |
325 |
- goto x962_err; |
326 |
-+#endif |
327 |
- |
328 |
- # ifndef OPENSSL_NO_EC2M |
329 |
- if (!TEST_true(x9_62_test_internal(NID_X9_62_c2tnb191v1, |
330 |
|
331 |
diff --git a/dev-libs/openssl/openssl-1.1.0j-r1.ebuild b/dev-libs/openssl/openssl-1.1.0j-r1.ebuild |
332 |
deleted file mode 100644 |
333 |
index 165f6d9a050..00000000000 |
334 |
--- a/dev-libs/openssl/openssl-1.1.0j-r1.ebuild |
335 |
+++ /dev/null |
336 |
@@ -1,299 +0,0 @@ |
337 |
-# Copyright 1999-2019 Gentoo Authors |
338 |
-# Distributed under the terms of the GNU General Public License v2 |
339 |
- |
340 |
-EAPI="6" |
341 |
- |
342 |
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal |
343 |
- |
344 |
-MY_P=${P/_/-} |
345 |
-DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)" |
346 |
-HOMEPAGE="https://www.openssl.org/" |
347 |
-SRC_URI="mirror://openssl/source/${MY_P}.tar.gz" |
348 |
- |
349 |
-LICENSE="openssl" |
350 |
-SLOT="0/1.1" # .so version of libssl/libcrypto |
351 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" |
352 |
-IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 static-libs test tls-heartbeat vanilla zlib" |
353 |
-RESTRICT="!bindist? ( bindist )" |
354 |
- |
355 |
-RDEPEND=">=app-misc/c_rehash-1.7-r1 |
356 |
- zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )" |
357 |
-DEPEND="${RDEPEND} |
358 |
- >=dev-lang/perl-5 |
359 |
- sctp? ( >=net-misc/lksctp-tools-1.0.12 ) |
360 |
- test? ( |
361 |
- sys-apps/diffutils |
362 |
- sys-devel/bc |
363 |
- )" |
364 |
-PDEPEND="app-misc/ca-certificates" |
365 |
- |
366 |
-# This does not copy the entire Fedora patchset, but JUST the parts that |
367 |
-# are needed to make it safe to use EC with RESTRICT=bindist. |
368 |
-# See openssl.spec for the matching numbering of SourceNNN, PatchNNN |
369 |
-SOURCE1=hobble-openssl |
370 |
-SOURCE12=ec_curve.c |
371 |
-SOURCE13=ectest.c |
372 |
-PATCH1=openssl-1.1.0-build.patch # Fixes EVP testcase for EC |
373 |
-PATCH37=openssl-1.1.0-ec-curves.patch |
374 |
-FEDORA_GIT_BASE='https://src.fedoraproject.org/cgit/rpms/openssl.git/plain/' |
375 |
-FEDORA_GIT_BRANCH='f28' |
376 |
-FEDORA_GIT_COMMIT="d2ede125556ac99aa0faa7744c703af3f559094e" |
377 |
-FEDORA_SRC_URI=() |
378 |
-FEDORA_SOURCE=( $SOURCE1 $SOURCE12 $SOURCE13 ) |
379 |
-FEDORA_PATCH=( $PATCH1 $PATCH37 ) |
380 |
-for i in "${FEDORA_SOURCE[@]}" ; do |
381 |
- FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH}&id=${FEDORA_GIT_COMMIT} -> ${P}_${FEDORA_GIT_COMMIT}_${i}" ) |
382 |
-done |
383 |
-for i in "${FEDORA_PATCH[@]}" ; do # Already have a version prefix |
384 |
- FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH}&id=${FEDORA_GIT_COMMIT} -> ${i%.patch}_${FEDORA_GIT_COMMIT}.patch" ) |
385 |
-done |
386 |
-SRC_URI+=" bindist? ( ${FEDORA_SRC_URI[@]} )" |
387 |
- |
388 |
-S="${WORKDIR}/${MY_P}" |
389 |
- |
390 |
-MULTILIB_WRAPPED_HEADERS=( |
391 |
- usr/include/openssl/opensslconf.h |
392 |
-) |
393 |
- |
394 |
-PATCHES=( |
395 |
- "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618 |
396 |
- "${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602 |
397 |
- "${FILESDIR}"/${PN}-1.1.1b-CVE-2019-1543.patch |
398 |
-) |
399 |
- |
400 |
-src_prepare() { |
401 |
- if use bindist; then |
402 |
- # we need to patch the patch but we cannot patch in DISTDIR... |
403 |
- mkdir "${WORKDIR}"/fedora_patches || die |
404 |
- for i in "${FEDORA_PATCH[@]}" ; do |
405 |
- cp "${DISTDIR}"/"${i%.patch}_${FEDORA_GIT_COMMIT}.patch" "${WORKDIR}"/fedora_patches || die |
406 |
- done |
407 |
- |
408 |
- # now patch the path, due to OpenSSL change cb193560e0da17a41b40ce574a2349f1d4d59ed1 |
409 |
- sed -i -e 's#test/evptests.txt#test/recipes/30-test_evp_data/evppkey.txt#g' \ |
410 |
- "${WORKDIR}"/fedora_patches/openssl-1.1.0-build_d2ede125556ac99aa0faa7744c703af3f559094e.patch || \ |
411 |
- die |
412 |
- |
413 |
- # This just removes the prefix, and puts it into WORKDIR like the RPM. |
414 |
- for i in "${FEDORA_SOURCE[@]}" ; do |
415 |
- cp -f "${DISTDIR}"/"${P}_${FEDORA_GIT_COMMIT}_${i}" "${WORKDIR}"/"${i}" || die |
416 |
- done |
417 |
- # .spec %prep |
418 |
- bash "${WORKDIR}"/"${SOURCE1}" || die |
419 |
- cp -f "${WORKDIR}"/"${SOURCE12}" "${S}"/crypto/ec/ || die |
420 |
- cp -f "${WORKDIR}"/"${SOURCE13}" "${S}"/test/ || die |
421 |
- for i in "${FEDORA_PATCH[@]}" ; do |
422 |
- #eapply "${DISTDIR}"/"${i%.patch}_${FEDORA_GIT_COMMIT}.patch" |
423 |
- eapply "${WORKDIR}/fedora_patches/${i%.patch}_${FEDORA_GIT_COMMIT}.patch" |
424 |
- done |
425 |
- # Also see the configure parts below: |
426 |
- # enable-ec \ |
427 |
- # $(use_ssl !bindist ec2m) \ |
428 |
- |
429 |
- fi |
430 |
- # keep this in sync with app-misc/c_rehash |
431 |
- SSL_CNF_DIR="/etc/ssl" |
432 |
- |
433 |
- # Make sure we only ever touch Makefile.org and avoid patching a file |
434 |
- # that gets blown away anyways by the Configure script in src_configure |
435 |
- rm -f Makefile |
436 |
- |
437 |
- if ! use vanilla ; then |
438 |
- eapply "${PATCHES[@]}" |
439 |
- fi |
440 |
- |
441 |
- eapply_user #332661 |
442 |
- |
443 |
- # make sure the man pages are suffixed #302165 |
444 |
- # don't bother building man pages if they're disabled |
445 |
- # Make DOCDIR Gentoo compliant |
446 |
- sed -i \ |
447 |
- -e '/^MANSUFFIX/s:=.*:=ssl:' \ |
448 |
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ |
449 |
- -e $(has noman FEATURES \ |
450 |
- && echo '/^install:/s:install_docs::' \ |
451 |
- || echo '/^MANDIR=/s:=.*:='${EPREFIX}'/usr/share/man:') \ |
452 |
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ |
453 |
- Configurations/unix-Makefile.tmpl \ |
454 |
- || die |
455 |
- |
456 |
- # show the actual commands in the log |
457 |
- sed -i '/^SET_X/s@=.*@=set -x@' Makefile.shared || die |
458 |
- |
459 |
- # quiet out unknown driver argument warnings since openssl |
460 |
- # doesn't have well-split CFLAGS and we're making it even worse |
461 |
- # and 'make depend' uses -Werror for added fun (#417795 again) |
462 |
- [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments |
463 |
- |
464 |
- # allow openssl to be cross-compiled |
465 |
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die |
466 |
- chmod a+rx gentoo.config || die |
467 |
- |
468 |
- append-flags -fno-strict-aliasing |
469 |
- append-flags $(test-flags-CC -Wa,--noexecstack) |
470 |
- append-cppflags -DOPENSSL_NO_BUF_FREELISTS |
471 |
- |
472 |
- # Prefixify Configure shebang (#141906) |
473 |
- sed \ |
474 |
- -e "1s,/usr/bin/env,${EPREFIX}&," \ |
475 |
- -i Configure || die |
476 |
- # Remove test target when FEATURES=test isn't set |
477 |
- if ! use test ; then |
478 |
- sed \ |
479 |
- -e '/^$config{dirs}/s@ "test",@@' \ |
480 |
- -i Configure || die |
481 |
- fi |
482 |
- # The config script does stupid stuff to prompt the user. Kill it. |
483 |
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
484 |
- ./config --test-sanity || die "I AM NOT SANE" |
485 |
- |
486 |
- multilib_copy_sources |
487 |
-} |
488 |
- |
489 |
-multilib_src_configure() { |
490 |
- unset APPS #197996 |
491 |
- unset SCRIPTS #312551 |
492 |
- unset CROSS_COMPILE #311473 |
493 |
- |
494 |
- tc-export CC AR RANLIB RC |
495 |
- |
496 |
- # Clean out patent-or-otherwise-encumbered code |
497 |
- # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher) |
498 |
- # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm |
499 |
- # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography |
500 |
- # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2 |
501 |
- # RC5: Expired https://en.wikipedia.org/wiki/RC5 |
502 |
- |
503 |
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } |
504 |
- echoit() { echo "$@" ; "$@" ; } |
505 |
- |
506 |
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") |
507 |
- |
508 |
- # See if our toolchain supports __uint128_t. If so, it's 64bit |
509 |
- # friendly and can use the nicely optimized code paths. #460790 |
510 |
- local ec_nistp_64_gcc_128 |
511 |
- # Disable it for now though #469976 |
512 |
- #if ! use bindist ; then |
513 |
- # echo "__uint128_t i;" > "${T}"/128.c |
514 |
- # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then |
515 |
- # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" |
516 |
- # fi |
517 |
- #fi |
518 |
- |
519 |
- local sslout=$(./gentoo.config) |
520 |
- einfo "Use configuration ${sslout:-(openssl knows best)}" |
521 |
- local config="Configure" |
522 |
- [[ -z ${sslout} ]] && config="config" |
523 |
- |
524 |
- # Fedora hobbled-EC needs 'no-ec2m' |
525 |
- # 'srp' was restricted until early 2017 as well. |
526 |
- # "disable-deprecated" option breaks too many consumers. |
527 |
- # Don't set it without thorough revdeps testing. |
528 |
- echoit \ |
529 |
- ./${config} \ |
530 |
- ${sslout} \ |
531 |
- $(use cpu_flags_x86_sse2 || echo "no-sse2") \ |
532 |
- enable-camellia \ |
533 |
- enable-ec \ |
534 |
- $(use_ssl !bindist ec2m) \ |
535 |
- enable-srp \ |
536 |
- $(use elibc_musl && echo "no-async") \ |
537 |
- ${ec_nistp_64_gcc_128} \ |
538 |
- enable-idea \ |
539 |
- enable-mdc2 \ |
540 |
- enable-rc5 \ |
541 |
- $(use_ssl asm) \ |
542 |
- $(use_ssl rfc3779) \ |
543 |
- $(use_ssl sctp) \ |
544 |
- $(use_ssl tls-heartbeat heartbeats) \ |
545 |
- $(use_ssl zlib) \ |
546 |
- --prefix="${EPREFIX}"/usr \ |
547 |
- --openssldir="${EPREFIX}"${SSL_CNF_DIR} \ |
548 |
- --libdir=$(get_libdir) \ |
549 |
- shared threads \ |
550 |
- || die |
551 |
- |
552 |
- # Clean out hardcoded flags that openssl uses |
553 |
- # Fix quoting for sed |
554 |
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ |
555 |
- -e 's:^CFLAGS=::' \ |
556 |
- -e 's:-fomit-frame-pointer ::g' \ |
557 |
- -e 's:-O[0-9] ::g' \ |
558 |
- -e 's:-march=[-a-z0-9]* ::g' \ |
559 |
- -e 's:-mcpu=[-a-z0-9]* ::g' \ |
560 |
- -e 's:-m[a-z0-9]* ::g' \ |
561 |
- -e 's:\\:\\\\:g' \ |
562 |
- ) |
563 |
- sed -i \ |
564 |
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ |
565 |
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ |
566 |
- Makefile || die |
567 |
-} |
568 |
- |
569 |
-multilib_src_compile() { |
570 |
- # depend is needed to use $confopts; it also doesn't matter |
571 |
- # that it's -j1 as the code itself serializes subdirs |
572 |
- emake -j1 depend |
573 |
- emake all |
574 |
-} |
575 |
- |
576 |
-multilib_src_test() { |
577 |
- emake -j1 test |
578 |
-} |
579 |
- |
580 |
-multilib_src_install() { |
581 |
- emake DESTDIR="${D}" install |
582 |
-} |
583 |
- |
584 |
-multilib_src_install_all() { |
585 |
- # openssl installs perl version of c_rehash by default, but |
586 |
- # we provide a shell version via app-misc/c_rehash |
587 |
- rm "${ED%/}"/usr/bin/c_rehash || die |
588 |
- |
589 |
- dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el |
590 |
- |
591 |
- # This is crappy in that the static archives are still built even |
592 |
- # when USE=static-libs. But this is due to a failing in the openssl |
593 |
- # build system: the static archives are built as PIC all the time. |
594 |
- # Only way around this would be to manually configure+compile openssl |
595 |
- # twice; once with shared lib support enabled and once without. |
596 |
- use static-libs || rm -f "${ED%/}"/usr/lib*/lib*.a |
597 |
- |
598 |
- # create the certs directory |
599 |
- keepdir ${SSL_CNF_DIR}/certs |
600 |
- |
601 |
- # Namespace openssl programs to prevent conflicts with other man pages |
602 |
- cd "${ED%/}"/usr/share/man || die |
603 |
- local m d s |
604 |
- for m in $(find . -type f | xargs grep -L '#include') ; do |
605 |
- d=${m%/*} ; d=${d#./} ; m=${m##*/} |
606 |
- [[ ${m} == openssl.1* ]] && continue |
607 |
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" |
608 |
- mv ${d}/{,ssl-}${m} |
609 |
- # fix up references to renamed man pages |
610 |
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} |
611 |
- ln -s ssl-${m} ${d}/openssl-${m} |
612 |
- # locate any symlinks that point to this man page ... we assume |
613 |
- # that any broken links are due to the above renaming |
614 |
- for s in $(find -L ${d} -type l) ; do |
615 |
- s=${s##*/} |
616 |
- rm -f ${d}/${s} |
617 |
- # We don't want to "|| die" here |
618 |
- ln -s ssl-${m} ${d}/ssl-${s} |
619 |
- ln -s ssl-${s} ${d}/openssl-${s} |
620 |
- done |
621 |
- done |
622 |
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" |
623 |
- |
624 |
- dodir /etc/sandbox.d #254521 |
625 |
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED%/}"/etc/sandbox.d/10openssl |
626 |
- |
627 |
- diropts -m0700 |
628 |
- keepdir ${SSL_CNF_DIR}/private |
629 |
-} |
630 |
- |
631 |
-pkg_postinst() { |
632 |
- ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" |
633 |
- c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null |
634 |
- eend $? |
635 |
-} |
636 |
|
637 |
diff --git a/dev-libs/openssl/openssl-1.1.1b-r2.ebuild b/dev-libs/openssl/openssl-1.1.1b-r2.ebuild |
638 |
deleted file mode 100644 |
639 |
index 09f5e991cf9..00000000000 |
640 |
--- a/dev-libs/openssl/openssl-1.1.1b-r2.ebuild |
641 |
+++ /dev/null |
642 |
@@ -1,299 +0,0 @@ |
643 |
-# Copyright 1999-2019 Gentoo Authors |
644 |
-# Distributed under the terms of the GNU General Public License v2 |
645 |
- |
646 |
-EAPI="6" |
647 |
- |
648 |
-inherit flag-o-matic toolchain-funcs multilib multilib-minimal |
649 |
- |
650 |
-MY_P=${P/_/-} |
651 |
-DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)" |
652 |
-HOMEPAGE="https://www.openssl.org/" |
653 |
-SRC_URI="mirror://openssl/source/${MY_P}.tar.gz" |
654 |
- |
655 |
-LICENSE="openssl" |
656 |
-SLOT="0/1.1" # .so version of libssl/libcrypto |
657 |
-[[ "${PV}" = *_pre* ]] || \ |
658 |
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux" |
659 |
-IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib" |
660 |
-RESTRICT="!bindist? ( bindist )" |
661 |
- |
662 |
-RDEPEND=">=app-misc/c_rehash-1.7-r1 |
663 |
- zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )" |
664 |
-DEPEND="${RDEPEND} |
665 |
- >=dev-lang/perl-5 |
666 |
- sctp? ( >=net-misc/lksctp-tools-1.0.12 ) |
667 |
- test? ( |
668 |
- sys-apps/diffutils |
669 |
- sys-devel/bc |
670 |
- )" |
671 |
-PDEPEND="app-misc/ca-certificates" |
672 |
- |
673 |
-PATCHES=( |
674 |
- "${FILESDIR}"/${PN}-1.1.0j-parallel_install_fix.patch #671602 |
675 |
- "${FILESDIR}"/${P}-CVE-2019-1543.patch |
676 |
-) |
677 |
- |
678 |
-# This does not copy the entire Fedora patchset, but JUST the parts that |
679 |
-# are needed to make it safe to use EC with RESTRICT=bindist. |
680 |
-# See openssl.spec for the matching numbering of SourceNNN, PatchNNN |
681 |
-SOURCE1=hobble-openssl |
682 |
-SOURCE12=ec_curve.c |
683 |
-SOURCE13=ectest.c |
684 |
-PATCH37=openssl-1.1.1-ec-curves.patch |
685 |
-FEDORA_GIT_BASE='https://src.fedoraproject.org/cgit/rpms/openssl.git/plain/' |
686 |
-FEDORA_GIT_BRANCH='f29' |
687 |
-FEDORA_SRC_URI=() |
688 |
-FEDORA_SOURCE=( ${SOURCE1} ${SOURCE12} ${SOURCE13} ) |
689 |
-FEDORA_PATCH=( ${PATCH37} ) |
690 |
-for i in "${FEDORA_SOURCE[@]}" ; do |
691 |
- FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH} -> ${P}_${i}" ) |
692 |
-done |
693 |
-for i in "${FEDORA_PATCH[@]}" ; do # Already have a version prefix |
694 |
- FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH} -> ${i}" ) |
695 |
-done |
696 |
-SRC_URI+=" bindist? ( ${FEDORA_SRC_URI[@]} )" |
697 |
- |
698 |
-S="${WORKDIR}/${MY_P}" |
699 |
- |
700 |
-MULTILIB_WRAPPED_HEADERS=( |
701 |
- usr/include/openssl/opensslconf.h |
702 |
-) |
703 |
- |
704 |
-src_prepare() { |
705 |
- if use bindist; then |
706 |
- # This just removes the prefix, and puts it into WORKDIR like the RPM. |
707 |
- for i in "${FEDORA_SOURCE[@]}" ; do |
708 |
- cp -f "${DISTDIR}"/"${P}_${i}" "${WORKDIR}"/"${i}" || die |
709 |
- done |
710 |
- |
711 |
- # .spec %prep |
712 |
- bash "${WORKDIR}"/"${SOURCE1}" || die |
713 |
- cp -f "${WORKDIR}"/"${SOURCE12}" "${S}"/crypto/ec/ || die |
714 |
- cp -f "${WORKDIR}"/"${SOURCE13}" "${S}"/test/ || die |
715 |
- for i in "${FEDORA_PATCH[@]}" ; do |
716 |
- if [[ "${i}" == "${PATCH37}" ]] ; then |
717 |
- # apply our own for OpenSSL 1.1.1b adjusted version of this patch |
718 |
- eapply "${FILESDIR}"/openssl-1.1.1b-ec-curves-patch.patch |
719 |
- else |
720 |
- eapply "${DISTDIR}"/"${i}" |
721 |
- fi |
722 |
- done |
723 |
- # Also see the configure parts below: |
724 |
- # enable-ec \ |
725 |
- # $(use_ssl !bindist ec2m) \ |
726 |
- |
727 |
- fi |
728 |
- |
729 |
- # keep this in sync with app-misc/c_rehash |
730 |
- SSL_CNF_DIR="/etc/ssl" |
731 |
- |
732 |
- # Make sure we only ever touch Makefile.org and avoid patching a file |
733 |
- # that gets blown away anyways by the Configure script in src_configure |
734 |
- rm -f Makefile |
735 |
- |
736 |
- if ! use vanilla ; then |
737 |
- if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then |
738 |
- [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}" |
739 |
- fi |
740 |
- fi |
741 |
- |
742 |
- eapply_user #332661 |
743 |
- |
744 |
- # make sure the man pages are suffixed #302165 |
745 |
- # don't bother building man pages if they're disabled |
746 |
- # Make DOCDIR Gentoo compliant |
747 |
- sed -i \ |
748 |
- -e '/^MANSUFFIX/s:=.*:=ssl:' \ |
749 |
- -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \ |
750 |
- -e $(has noman FEATURES \ |
751 |
- && echo '/^install:/s:install_docs::' \ |
752 |
- || echo '/^MANDIR=/s:=.*:='${EPREFIX%/}'/usr/share/man:') \ |
753 |
- -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \ |
754 |
- Configurations/unix-Makefile.tmpl \ |
755 |
- || die |
756 |
- |
757 |
- # quiet out unknown driver argument warnings since openssl |
758 |
- # doesn't have well-split CFLAGS and we're making it even worse |
759 |
- # and 'make depend' uses -Werror for added fun (#417795 again) |
760 |
- [[ ${CC} == *clang* ]] && append-flags -Qunused-arguments |
761 |
- |
762 |
- # allow openssl to be cross-compiled |
763 |
- cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die |
764 |
- chmod a+rx gentoo.config || die |
765 |
- |
766 |
- append-flags -fno-strict-aliasing |
767 |
- append-flags $(test-flags-CC -Wa,--noexecstack) |
768 |
- append-cppflags -DOPENSSL_NO_BUF_FREELISTS |
769 |
- |
770 |
- # Prefixify Configure shebang (#141906) |
771 |
- sed \ |
772 |
- -e "1s,/usr/bin/env,${EPREFIX%/}&," \ |
773 |
- -i Configure || die |
774 |
- # Remove test target when FEATURES=test isn't set |
775 |
- if ! use test ; then |
776 |
- sed \ |
777 |
- -e '/^$config{dirs}/s@ "test",@@' \ |
778 |
- -i Configure || die |
779 |
- fi |
780 |
- # The config script does stupid stuff to prompt the user. Kill it. |
781 |
- sed -i '/stty -icanon min 0 time 50; read waste/d' config || die |
782 |
- ./config --test-sanity || die "I AM NOT SANE" |
783 |
- |
784 |
- multilib_copy_sources |
785 |
-} |
786 |
- |
787 |
-multilib_src_configure() { |
788 |
- unset APPS #197996 |
789 |
- unset SCRIPTS #312551 |
790 |
- unset CROSS_COMPILE #311473 |
791 |
- |
792 |
- tc-export CC AR RANLIB RC |
793 |
- |
794 |
- # Clean out patent-or-otherwise-encumbered code |
795 |
- # Camellia: Royalty Free https://en.wikipedia.org/wiki/Camellia_(cipher) |
796 |
- # IDEA: Expired https://en.wikipedia.org/wiki/International_Data_Encryption_Algorithm |
797 |
- # EC: ????????? ??/??/2015 https://en.wikipedia.org/wiki/Elliptic_Curve_Cryptography |
798 |
- # MDC2: Expired https://en.wikipedia.org/wiki/MDC-2 |
799 |
- # RC5: Expired https://en.wikipedia.org/wiki/RC5 |
800 |
- |
801 |
- use_ssl() { usex $1 "enable-${2:-$1}" "no-${2:-$1}" " ${*:3}" ; } |
802 |
- echoit() { echo "$@" ; "$@" ; } |
803 |
- |
804 |
- local krb5=$(has_version app-crypt/mit-krb5 && echo "MIT" || echo "Heimdal") |
805 |
- |
806 |
- # See if our toolchain supports __uint128_t. If so, it's 64bit |
807 |
- # friendly and can use the nicely optimized code paths. #460790 |
808 |
- local ec_nistp_64_gcc_128 |
809 |
- # Disable it for now though #469976 |
810 |
- #if ! use bindist ; then |
811 |
- # echo "__uint128_t i;" > "${T}"/128.c |
812 |
- # if ${CC} ${CFLAGS} -c "${T}"/128.c -o /dev/null >&/dev/null ; then |
813 |
- # ec_nistp_64_gcc_128="enable-ec_nistp_64_gcc_128" |
814 |
- # fi |
815 |
- #fi |
816 |
- |
817 |
- local sslout=$(./gentoo.config) |
818 |
- einfo "Use configuration ${sslout:-(openssl knows best)}" |
819 |
- local config="Configure" |
820 |
- [[ -z ${sslout} ]] && config="config" |
821 |
- |
822 |
- # Fedora hobbled-EC needs 'no-ec2m' |
823 |
- # 'srp' was restricted until early 2017 as well. |
824 |
- # "disable-deprecated" option breaks too many consumers. |
825 |
- # Don't set it without thorough revdeps testing. |
826 |
- echoit \ |
827 |
- ./${config} \ |
828 |
- ${sslout} \ |
829 |
- $(use cpu_flags_x86_sse2 || echo "no-sse2") \ |
830 |
- enable-camellia \ |
831 |
- enable-ec \ |
832 |
- $(use_ssl !bindist ec2m) \ |
833 |
- enable-srp \ |
834 |
- $(use elibc_musl && echo "no-async") \ |
835 |
- ${ec_nistp_64_gcc_128} \ |
836 |
- enable-idea \ |
837 |
- enable-mdc2 \ |
838 |
- enable-rc5 \ |
839 |
- $(use_ssl sslv3 ssl3) \ |
840 |
- $(use_ssl sslv3 ssl3-method) \ |
841 |
- $(use_ssl asm) \ |
842 |
- $(use_ssl rfc3779) \ |
843 |
- $(use_ssl sctp) \ |
844 |
- $(use_ssl tls-heartbeat heartbeats) \ |
845 |
- $(use_ssl zlib) \ |
846 |
- --prefix="${EPREFIX%/}"/usr \ |
847 |
- --openssldir="${EPREFIX%/}"${SSL_CNF_DIR} \ |
848 |
- --libdir=$(get_libdir) \ |
849 |
- shared threads \ |
850 |
- || die |
851 |
- |
852 |
- # Clean out hardcoded flags that openssl uses |
853 |
- # Fix quoting for sed |
854 |
- local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ |
855 |
- -e 's:^CFLAGS=::' \ |
856 |
- -e 's:-fomit-frame-pointer ::g' \ |
857 |
- -e 's:-O[0-9] ::g' \ |
858 |
- -e 's:-march=[-a-z0-9]* ::g' \ |
859 |
- -e 's:-mcpu=[-a-z0-9]* ::g' \ |
860 |
- -e 's:-m[a-z0-9]* ::g' \ |
861 |
- -e 's:\\:\\\\:g' \ |
862 |
- ) |
863 |
- sed -i \ |
864 |
- -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \ |
865 |
- -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \ |
866 |
- Makefile || die |
867 |
-} |
868 |
- |
869 |
-multilib_src_compile() { |
870 |
- # depend is needed to use $confopts; it also doesn't matter |
871 |
- # that it's -j1 as the code itself serializes subdirs |
872 |
- emake -j1 depend |
873 |
- emake all |
874 |
-} |
875 |
- |
876 |
-multilib_src_test() { |
877 |
- emake -j1 test |
878 |
-} |
879 |
- |
880 |
-multilib_src_install() { |
881 |
- # We need to create $ED/usr on our own to avoid a race condition #665130 |
882 |
- if [[ ! -d "${ED%/}/usr" ]]; then |
883 |
- # We can only create this directory once |
884 |
- mkdir "${ED%/}"/usr || die |
885 |
- fi |
886 |
- |
887 |
- emake DESTDIR="${D%/}" install |
888 |
-} |
889 |
- |
890 |
-multilib_src_install_all() { |
891 |
- # openssl installs perl version of c_rehash by default, but |
892 |
- # we provide a shell version via app-misc/c_rehash |
893 |
- rm "${ED%/}"/usr/bin/c_rehash || die |
894 |
- |
895 |
- dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el |
896 |
- |
897 |
- # This is crappy in that the static archives are still built even |
898 |
- # when USE=static-libs. But this is due to a failing in the openssl |
899 |
- # build system: the static archives are built as PIC all the time. |
900 |
- # Only way around this would be to manually configure+compile openssl |
901 |
- # twice; once with shared lib support enabled and once without. |
902 |
- use static-libs || rm -f "${ED%/}"/usr/lib*/lib*.a |
903 |
- |
904 |
- # create the certs directory |
905 |
- keepdir ${SSL_CNF_DIR}/certs |
906 |
- |
907 |
- # Namespace openssl programs to prevent conflicts with other man pages |
908 |
- cd "${ED%/}"/usr/share/man || die |
909 |
- local m d s |
910 |
- for m in $(find . -type f | xargs grep -L '#include') ; do |
911 |
- d=${m%/*} ; d=${d#./} ; m=${m##*/} |
912 |
- [[ ${m} == openssl.1* ]] && continue |
913 |
- [[ -n $(find -L ${d} -type l) ]] && die "erp, broken links already!" |
914 |
- mv ${d}/{,ssl-}${m} |
915 |
- # fix up references to renamed man pages |
916 |
- sed -i '/^[.]SH "SEE ALSO"/,/^[.]/s:\([^(, ]*(1)\):ssl-\1:g' ${d}/ssl-${m} |
917 |
- ln -s ssl-${m} ${d}/openssl-${m} |
918 |
- # locate any symlinks that point to this man page ... we assume |
919 |
- # that any broken links are due to the above renaming |
920 |
- for s in $(find -L ${d} -type l) ; do |
921 |
- s=${s##*/} |
922 |
- rm -f ${d}/${s} |
923 |
- # We don't want to "|| die" here |
924 |
- ln -s ssl-${m} ${d}/ssl-${s} |
925 |
- ln -s ssl-${s} ${d}/openssl-${s} |
926 |
- done |
927 |
- done |
928 |
- [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :(" |
929 |
- |
930 |
- dodir /etc/sandbox.d #254521 |
931 |
- echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED%/}"/etc/sandbox.d/10openssl |
932 |
- |
933 |
- diropts -m0700 |
934 |
- keepdir ${SSL_CNF_DIR}/private |
935 |
-} |
936 |
- |
937 |
-pkg_postinst() { |
938 |
- ebegin "Running 'c_rehash ${EROOT%/}${SSL_CNF_DIR}/certs/' to rebuild hashes #333069" |
939 |
- c_rehash "${EROOT%/}${SSL_CNF_DIR}/certs" >/dev/null |
940 |
- eend $? |
941 |
-} |