Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/openssl/, dev-libs/openssl/files/
Date: Tue, 20 Nov 2018 14:46:27
Message-Id: 1542725117.b28e60d76c3f7a1f4ff4322acd6aa006364f9de7.polynomial-c@gentoo
1 commit: b28e60d76c3f7a1f4ff4322acd6aa006364f9de7
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue Nov 20 14:45:17 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 20 14:45:17 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b28e60d7
7
8 dev-libs/openssl: Security bump to versions 1.0.2q, 1.1.0j and 1.1.1a
9
10 Removed old.
11
12 Package-Manager: Portage-2.3.52, Repoman-2.3.12
13 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
14
15 dev-libs/openssl/Manifest | 21 ++--
16 .../files/openssl-1.1.0i-CVE-2018-0734.patch | 131 ---------------------
17 .../files/openssl-1.1.0i-CVE-2018-0735.patch | 44 -------
18 .../files/openssl-1.1.1-CVE-2018-0734.patch | 131 ---------------------
19 .../files/openssl-1.1.1-CVE-2018-0735.patch | 44 -------
20 ...enssl-1.1.1-r3.ebuild => openssl-1.0.2q.ebuild} | 128 +++++++++++---------
21 ...nssl-1.1.0i-r3.ebuild => openssl-1.1.0j.ebuild} | 2 -
22 ...enssl-1.1.1-r3.ebuild => openssl-1.1.1a.ebuild} | 5 -
23 8 files changed, 85 insertions(+), 421 deletions(-)
24
25 diff --git a/dev-libs/openssl/Manifest b/dev-libs/openssl/Manifest
26 index 6586b888cd9..830b54cf634 100644
27 --- a/dev-libs/openssl/Manifest
28 +++ b/dev-libs/openssl/Manifest
29 @@ -1,17 +1,22 @@
30 DIST openssl-0.9.8zh.tar.gz 3818524 BLAKE2B 610bb4858900983cf4519fa8b63f1e03b3845e39e68884fd8bebd738cd5cd6c2c75513643af49bf9e2294adc446a6516480fe9b62de55d9b6379bf9e7c5cd364 SHA512 b97fa2468211f86c0719c68ad1781eff84f772c479ed5193d6da14bac086b4ca706e7d851209d9df3f0962943b5e5333ab0def00110fb2e517caa73c0c6674c6
31 +DIST openssl-1.0.2-patches-1.5.tar.xz 12404 BLAKE2B 6c1b8c28f339f539b2ab8643379502a24cf62bffde00041dce54d5dd9e8d2620b181362ee5464b0ab32ba4948e209697bfabadbea2944a409a1009100d298f24 SHA512 5725e2d9d1ee8cc074bcef3bed61c71bdab2ff1c114362110c3fb8da11ad5bc8f2ff28e90a293f5f3a5cf96ecda54dffdb7ab3fb3f8b23ef6472250dc3037659
32 DIST openssl-1.0.2-patches-1.6.tar.xz 16004 BLAKE2B 28c7e9a8c8b09a34aa6ed21dec18b04c1d6140276e319cfa99b63db5ae188ca7837c444e8352748ffc86e6df7676534aef2f28788e825ee8207c0f876efb5b7b SHA512 eac9bbbebd8d942707ef385ee466929045bb4698985f7a0fb16f529f2101a246735cc2e654bfbdaa8a178224bb5ac564478a7587e6156cfcbdfe62a719bfb0a3
33 DIST openssl-1.0.2p.tar.gz 5338192 BLAKE2B fe4c0e2bf75d47a76e7377c7977be7bcaaa532061ab89ee989786eeb6495295711a29a88bf026c85d9ed55c97e71b0e9c8cf4c29b6e58a3dc56bcff518666823 SHA512 958c5a7c3324bbdc8f07dfb13e11329d9a1b4452c07cf41fbd2d42b5fe29c95679332a3476d24c2dc2b88be16e4a24744aba675a05a388c0905756c77a8a2f16
34 DIST openssl-1.0.2p_ec_curve.c 17254 BLAKE2B d40d8d6e770443f07abe70e2c4ddda6aec1cc8e37dc1f226a3fdd9ed5d228f09c6d372e8956b1948b55ee1d57d1429493e7288d0f54d9466a37fec805c85aacb SHA512 8e92fb100bcf4bd918c82b9a6cbd75a55abe1a2c08230a007e441c51577f974f8cc336e9ac8a672b32641480428ca8cead5380da1fe81bacb088145a1b754a15
35 DIST openssl-1.0.2p_ectest.c 30735 BLAKE2B 95333a27f1cf0a4305a3cee7f6d46b9d4673582ca9acfcf5ba2a0d9d317ab6219cd0d2ff0ba3a55a317c8f5819342f05cc17ba80ec2c92b2b4cab9a3552382e1 SHA512 f2e4d34327b490bc8371f0845c69df3f9fc51ea16f0ea0de0411a0c1fa9d49bb2b6fafc363eb3b3cd919dc7c24e4a0d075c6ff878c01d70dae918f2540874c19
36 DIST openssl-1.0.2p_hobble-openssl 1302 BLAKE2B 647caa6a0f4c53a2e77baa3b8e5961eaef3bb0ff38e7d5475eab8deef3439f7fe49028ec9ed0406f3453870b62cac67c496b3a048ee4c9ff4c6866d520235960 SHA512 3d757a4708e74a03dd5cb9b8114dfe442ed9520739a6eca693be4c4265771696f1449ea06d1c9bcfc6e94fc9b0dd0c10e153f1c3b0334831c0550b36cd63326e
37 +DIST openssl-1.0.2q.tar.gz 5345604 BLAKE2B c03dd92de1cc8941a7f3e4d9f2fe6f8e4ea89eccc58743d7690491fc22cc54a9783311699b008aeb4a0d37cd3172154e67623c8ada6fc8dde57e80a5cd3c5fc1 SHA512 403e6cad42db3ba860c3fa4fa81c1b7b02f0b873259e5c19a7fc8e42de0854602555f1b1ca74f4e3a7737a4cbd3aac063061e628ec86534586500819fae7fec0
38 +DIST openssl-1.0.2q_ec_curve.c 17254 BLAKE2B d40d8d6e770443f07abe70e2c4ddda6aec1cc8e37dc1f226a3fdd9ed5d228f09c6d372e8956b1948b55ee1d57d1429493e7288d0f54d9466a37fec805c85aacb SHA512 8e92fb100bcf4bd918c82b9a6cbd75a55abe1a2c08230a007e441c51577f974f8cc336e9ac8a672b32641480428ca8cead5380da1fe81bacb088145a1b754a15
39 +DIST openssl-1.0.2q_ectest.c 30735 BLAKE2B 95333a27f1cf0a4305a3cee7f6d46b9d4673582ca9acfcf5ba2a0d9d317ab6219cd0d2ff0ba3a55a317c8f5819342f05cc17ba80ec2c92b2b4cab9a3552382e1 SHA512 f2e4d34327b490bc8371f0845c69df3f9fc51ea16f0ea0de0411a0c1fa9d49bb2b6fafc363eb3b3cd919dc7c24e4a0d075c6ff878c01d70dae918f2540874c19
40 +DIST openssl-1.0.2q_hobble-openssl 1302 BLAKE2B 647caa6a0f4c53a2e77baa3b8e5961eaef3bb0ff38e7d5475eab8deef3439f7fe49028ec9ed0406f3453870b62cac67c496b3a048ee4c9ff4c6866d520235960 SHA512 3d757a4708e74a03dd5cb9b8114dfe442ed9520739a6eca693be4c4265771696f1449ea06d1c9bcfc6e94fc9b0dd0c10e153f1c3b0334831c0550b36cd63326e
41 DIST openssl-1.1.0-build.patch 3001 BLAKE2B 8f0ac4be6409b4ec50bec171697da2aebe2688e8ae06bd0dfac8b0c74661d38ebeb0a12bde0ef941b213eee9b85965262213b140636060285dcfb02a3bd14961 SHA512 ec6710e9669ac19e4c6f1286c89a383e7d276a773a2740037f98a8f2dbf18305614e7d30d9ed530923a0e7d10a3776fea2ca77229adc25df13ecad55589a3673
42 DIST openssl-1.1.0-ec-curves.patch 5311 BLAKE2B e9ec985adf6f13eb04412158a05da7cbe10be7d64bce73b899152ea379336ece7b7069089ef46993ac301ef850fd46fd0352898e249b2ea9fff5baf20896e5b5 SHA512 c38c4b05195f2b323a07efd8d17335ba2a168a16a59d7941da36568081f1c043da8d2216b7084b0617963635ded9bafeee736ecddbfa251cf0a02e4cba64cdc8
43 -DIST openssl-1.1.0i.tar.gz 5453234 BLAKE2B ae6bec9c116769d98a77165b96fb7d201fe2ede8ee98e3cb68eba496cc90a5fae38dbcbb68b824c9eeacb25605aa80c3ccca9b4f00725658da3ad646834b0f9d SHA512 4a9d454031f644a3072a980f4ea20df976f6c5c58178549dfa62fd4dcf1417509e3be517d2ccb265c87688836f2993531b142fc5971bac5c41d33060057627df
44 -DIST openssl-1.1.0i_ec_curve.c 18401 BLAKE2B f969071ac1b5d0e43b50d54e50b5c4d9201fc8b94458902e9849f14841b5505a2e43ed57a8c13255f042a211af9ee904776c155c36da838a8ad22e1052b02bc1 SHA512 a1c2bb3c3e3d342bddc8c952985e87fc4bad2e8142d5d760b18f346c44c20f00db61c4856f3dcf879b2098e0c036330762915f65d80a1a2cba717d2caeb95457
45 -DIST openssl-1.1.0i_ectest.c 30688 BLAKE2B 6673ef0fd139af82d830794179b19b9e06be25fac4a13b8bdfa5fd5dad25f594ce8eab118aab9ec2aab25001e1de127c03f8e1a04f4f3ef4c464b7fb1811ed4a SHA512 240fc72916caf4a8b0af774ce307abfe9a93a762eba6fae760cec79d619fe3db0d6919fc92a8951cb031f73958237700b45f590aa7f9f2890762cccda1f1e74b
46 -DIST openssl-1.1.0i_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826
47 +DIST openssl-1.1.0j.tar.gz 5411919 BLAKE2B 0fbd936f38d30b64bea717a67cd59704c5ce44ee19f377a820f89ba66b9e0a7509cf39e0fb00c104ae6440a6bd811e388239b458ffe685d8601235bab2afb2f1 SHA512 e7d30951ebb3cbcb6d59e3eb40f64f5a84634b7f5c380a588d378973f1c415395e3ab71a9aaff6478a89ec6efcc88f17f1882c99c25dcd18165f1435a51e5768
48 +DIST openssl-1.1.0j_ec_curve.c 18401 BLAKE2B f969071ac1b5d0e43b50d54e50b5c4d9201fc8b94458902e9849f14841b5505a2e43ed57a8c13255f042a211af9ee904776c155c36da838a8ad22e1052b02bc1 SHA512 a1c2bb3c3e3d342bddc8c952985e87fc4bad2e8142d5d760b18f346c44c20f00db61c4856f3dcf879b2098e0c036330762915f65d80a1a2cba717d2caeb95457
49 +DIST openssl-1.1.0j_ectest.c 30688 BLAKE2B 6673ef0fd139af82d830794179b19b9e06be25fac4a13b8bdfa5fd5dad25f594ce8eab118aab9ec2aab25001e1de127c03f8e1a04f4f3ef4c464b7fb1811ed4a SHA512 240fc72916caf4a8b0af774ce307abfe9a93a762eba6fae760cec79d619fe3db0d6919fc92a8951cb031f73958237700b45f590aa7f9f2890762cccda1f1e74b
50 +DIST openssl-1.1.0j_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826
51 DIST openssl-1.1.1-ec-curves.patch 7265 BLAKE2B 04725d226c430132cf54afbfaa30a82f8f8bbfd3608823d1d0cd42c3c13f417e90762759da3134d7b0c4373e531925db337b681340f2f284cb2f16a4caef22e3 SHA512 de4d0f1635740c57217836a476c420141c0d34a5f90cbf7957aed7a80e7ac9ca036de2d8448e6bf4c122999e308730575899f61cea6e51ab6825dd04890d75a1
52 -DIST openssl-1.1.1.tar.gz 8337920 BLAKE2B 266fb97bad4e1e7c0694c67a065d6669560695c92ad8fa10824169288a3fdfb9798faf408274a1e0c4e10a83a12b57367611bf4037dd2ab7ee74d7edab580a7b SHA512 c0284a4fe84bdf765ca5bc5148da4441ffc36392cfecaf9d372af00cf93b6de5681cab1248b6f8246474532155dc205da5ad49549ad7c61c07c917145e7c9c71
53 -DIST openssl-1.1.1_ec_curve.c 17938 BLAKE2B d5cbde40dcd8608087aed6ffa9feb040ffadecf0c46b7f3978cc468a9503f0a5ad0a426ea6f8db56f49a64474a508bebdf946e01ebf09adc727675f3b180bcdc SHA512 ec470f6514cb9a4f680b8cbbe02e2bbe71639b288f3429d976726047901d9c50377dfb2737f32429da2fb0e52fd67878a86debb54520e307ee196d97b5c66415
54 -DIST openssl-1.1.1_ectest.c 35091 BLAKE2B a9602255ab529751c2af2419206ce113f03f93b7b776691ea2ec550f26ddbecd241844bb81dc86988fdbb1c0a587318f82ce4faecba1a6142a19cf08d40fb2c5 SHA512 7813d9b6b7ab62119a7f2dd5431c17c5839f4c320ac7071b0714c9b8528bda5fda779dbb263328dca6ee8446e9fa09c663da659c9a82832a65cf53d1cd8a4cef
55 -DIST openssl-1.1.1_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826
56 +DIST openssl-1.1.1a.tar.gz 8350547 BLAKE2B 71dae2f44ade3e31983599a491b5efe5da63bbe4f32a2336a8022b282f844a9d898f3b1c3fa825a5973cb16898e8e87fcd73d68e9b602b58f500c3f3e047b199 SHA512 1523985ba90f38aa91aa6c2d57652f4e243cb2a095ce6336bf34b39b5a9b5b876804299a6825c758b65990e57948da532cca761aa12b10958c97478d04dd6d34
57 +DIST openssl-1.1.1a_ec_curve.c 17938 BLAKE2B d5cbde40dcd8608087aed6ffa9feb040ffadecf0c46b7f3978cc468a9503f0a5ad0a426ea6f8db56f49a64474a508bebdf946e01ebf09adc727675f3b180bcdc SHA512 ec470f6514cb9a4f680b8cbbe02e2bbe71639b288f3429d976726047901d9c50377dfb2737f32429da2fb0e52fd67878a86debb54520e307ee196d97b5c66415
58 +DIST openssl-1.1.1a_ectest.c 35091 BLAKE2B a9602255ab529751c2af2419206ce113f03f93b7b776691ea2ec550f26ddbecd241844bb81dc86988fdbb1c0a587318f82ce4faecba1a6142a19cf08d40fb2c5 SHA512 7813d9b6b7ab62119a7f2dd5431c17c5839f4c320ac7071b0714c9b8528bda5fda779dbb263328dca6ee8446e9fa09c663da659c9a82832a65cf53d1cd8a4cef
59 +DIST openssl-1.1.1a_hobble-openssl 1117 BLAKE2B c3a1477e63331e83cf1cbe58e9ef131ec500a311e22d3da55034800ca353c387b2e202575acf3badb00b236ff91d4bac1bb131a33930939646d26bec27be6e04 SHA512 fa9cc70afa11a7a292548b4bddbba8159824a364ce5c279b483768e6ae2aa4b5491d9bf2cc734819f30a11c8ee0d91bcb991c4a7ab357296aeb4c04feac74826
60
61 diff --git a/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0734.patch b/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0734.patch
62 deleted file mode 100644
63 index 47b082f4085..00000000000
64 --- a/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0734.patch
65 +++ /dev/null
66 @@ -1,131 +0,0 @@
67 -CVE-2018-0734
68 -https://github.com/openssl/openssl/commit/415c33563528667868c3c653a612e6fc8736fd79
69 -https://github.com/openssl/openssl/commit/ef11e19d1365eea2b1851e6f540a0bf365d303e7
70 -
71 ---- a/crypto/dsa/dsa_ossl.c
72 -+++ b/crypto/dsa/dsa_ossl.c
73 -@@ -11,6 +11,7 @@
74 -
75 - #include <stdio.h>
76 - #include "internal/cryptlib.h"
77 -+#include "internal/bn_int.h"
78 - #include <openssl/bn.h>
79 - #include <openssl/sha.h>
80 - #include "dsa_locl.h"
81 -@@ -25,6 +26,8 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len,
82 - DSA_SIG *sig, DSA *dsa);
83 - static int dsa_init(DSA *dsa);
84 - static int dsa_finish(DSA *dsa);
85 -+static BIGNUM *dsa_mod_inverse_fermat(const BIGNUM *k, const BIGNUM *q,
86 -+ BN_CTX *ctx);
87 -
88 - static DSA_METHOD openssl_dsa_meth = {
89 - "OpenSSL DSA method",
90 -@@ -180,9 +183,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
91 - {
92 - BN_CTX *ctx = NULL;
93 - BIGNUM *k, *kinv = NULL, *r = *rp;
94 -- BIGNUM *l, *m;
95 -+ BIGNUM *l;
96 - int ret = 0;
97 -- int q_bits;
98 -+ int q_bits, q_words;
99 -
100 - if (!dsa->p || !dsa->q || !dsa->g) {
101 - DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_MISSING_PARAMETERS);
102 -@@ -191,8 +194,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
103 -
104 - k = BN_new();
105 - l = BN_new();
106 -- m = BN_new();
107 -- if (k == NULL || l == NULL || m == NULL)
108 -+ if (k == NULL || l == NULL)
109 - goto err;
110 -
111 - if (ctx_in == NULL) {
112 -@@ -203,9 +205,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
113 -
114 - /* Preallocate space */
115 - q_bits = BN_num_bits(dsa->q);
116 -- if (!BN_set_bit(k, q_bits)
117 -- || !BN_set_bit(l, q_bits)
118 -- || !BN_set_bit(m, q_bits))
119 -+ q_words = bn_get_top(dsa->q);
120 -+ if (!bn_wexpand(k, q_words + 2)
121 -+ || !bn_wexpand(l, q_words + 2))
122 - goto err;
123 -
124 - /* Get random k */
125 -@@ -240,14 +242,17 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
126 - * small timing information leakage. We then choose the sum that is
127 - * one bit longer than the modulus.
128 - *
129 -- * TODO: revisit the BN_copy aiming for a memory access agnostic
130 -- * conditional copy.
131 -+ * There are some concerns about the efficacy of doing this. More
132 -+ * specificly refer to the discussion starting with:
133 -+ * https://github.com/openssl/openssl/pull/7486#discussion_r228323705
134 -+ * The fix is to rework BN so these gymnastics aren't required.
135 - */
136 - if (!BN_add(l, k, dsa->q)
137 -- || !BN_add(m, l, dsa->q)
138 -- || !BN_copy(k, BN_num_bits(l) > q_bits ? l : m))
139 -+ || !BN_add(k, l, dsa->q))
140 - goto err;
141 -
142 -+ BN_consttime_swap(BN_is_bit_set(l, q_bits), k, l, q_words + 2);
143 -+
144 - if ((dsa)->meth->bn_mod_exp != NULL) {
145 - if (!dsa->meth->bn_mod_exp(dsa, r, dsa->g, k, dsa->p, ctx,
146 - dsa->method_mont_p))
147 -@@ -260,8 +265,8 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
148 - if (!BN_mod(r, r, dsa->q, ctx))
149 - goto err;
150 -
151 -- /* Compute part of 's = inv(k) (m + xr) mod q' */
152 -- if ((kinv = BN_mod_inverse(NULL, k, dsa->q, ctx)) == NULL)
153 -+ /* Compute part of 's = inv(k) (m + xr) mod q' */
154 -+ if ((kinv = dsa_mod_inverse_fermat(k, dsa->q, ctx)) == NULL)
155 - goto err;
156 -
157 - BN_clear_free(*kinvp);
158 -@@ -275,7 +280,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
159 - BN_CTX_free(ctx);
160 - BN_clear_free(k);
161 - BN_clear_free(l);
162 -- BN_clear_free(m);
163 - return ret;
164 - }
165 -
166 -@@ -395,3 +399,31 @@ static int dsa_finish(DSA *dsa)
167 - BN_MONT_CTX_free(dsa->method_mont_p);
168 - return (1);
169 - }
170 -+
171 -+/*
172 -+ * Compute the inverse of k modulo q.
173 -+ * Since q is prime, Fermat's Little Theorem applies, which reduces this to
174 -+ * mod-exp operation. Both the exponent and modulus are public information
175 -+ * so a mod-exp that doesn't leak the base is sufficient. A newly allocated
176 -+ * BIGNUM is returned which the caller must free.
177 -+ */
178 -+static BIGNUM *dsa_mod_inverse_fermat(const BIGNUM *k, const BIGNUM *q,
179 -+ BN_CTX *ctx)
180 -+{
181 -+ BIGNUM *res = NULL;
182 -+ BIGNUM *r, *e;
183 -+
184 -+ if ((r = BN_new()) == NULL)
185 -+ return NULL;
186 -+
187 -+ BN_CTX_start(ctx);
188 -+ if ((e = BN_CTX_get(ctx)) != NULL
189 -+ && BN_set_word(r, 2)
190 -+ && BN_sub(e, q, r)
191 -+ && BN_mod_exp_mont(r, k, e, q, ctx, NULL))
192 -+ res = r;
193 -+ else
194 -+ BN_free(r);
195 -+ BN_CTX_end(ctx);
196 -+ return res;
197 -+}
198
199 diff --git a/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch b/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch
200 deleted file mode 100644
201 index 5762c04fa34..00000000000
202 --- a/dev-libs/openssl/files/openssl-1.1.0i-CVE-2018-0735.patch
203 +++ /dev/null
204 @@ -1,44 +0,0 @@
205 -From 56fb454d281a023b3f950d969693553d3f3ceea1 Mon Sep 17 00:00:00 2001
206 -From: Pauli <paul.dale@××××××.com>
207 -Date: Fri, 26 Oct 2018 10:54:58 +1000
208 -Subject: [PATCH] Timing vulnerability in ECDSA signature generation
209 - (CVE-2018-0735)
210 -
211 -Preallocate an extra limb for some of the big numbers to avoid a reallocation
212 -that can potentially provide a side channel.
213 -
214 -Reviewed-by: Bernd Edlinger <bernd.edlinger@×××××××.de>
215 -(Merged from https://github.com/openssl/openssl/pull/7486)
216 -
217 -(cherry picked from commit 99540ec79491f59ed8b46b4edf130e17dc907f52)
218 ----
219 - crypto/ec/ec_mult.c | 6 +++---
220 - 1 file changed, 3 insertions(+), 3 deletions(-)
221 -
222 -diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
223 -index 22bb30ffa1..ff882cce20 100644
224 ---- a/crypto/ec/ec_mult.c
225 -+++ b/crypto/ec/ec_mult.c
226 -@@ -177,8 +177,8 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
227 - */
228 - cardinality_bits = BN_num_bits(cardinality);
229 - group_top = bn_get_top(cardinality);
230 -- if ((bn_wexpand(k, group_top + 1) == NULL)
231 -- || (bn_wexpand(lambda, group_top + 1) == NULL))
232 -+ if ((bn_wexpand(k, group_top + 2) == NULL)
233 -+ || (bn_wexpand(lambda, group_top + 2) == NULL))
234 - goto err;
235 -
236 - if (!BN_copy(k, scalar))
237 -@@ -205,7 +205,7 @@ static int ec_mul_consttime(const EC_GROUP *group, EC_POINT *r,
238 - * k := scalar + 2*cardinality
239 - */
240 - kbit = BN_is_bit_set(lambda, cardinality_bits);
241 -- BN_consttime_swap(kbit, k, lambda, group_top + 1);
242 -+ BN_consttime_swap(kbit, k, lambda, group_top + 2);
243 -
244 - group_top = bn_get_top(group->field);
245 - if ((bn_wexpand(s->X, group_top) == NULL)
246 ---
247 -2.19.1
248 -
249
250 diff --git a/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0734.patch b/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0734.patch
251 deleted file mode 100644
252 index dbc379c80d4..00000000000
253 --- a/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0734.patch
254 +++ /dev/null
255 @@ -1,131 +0,0 @@
256 -CVE-2018-0734
257 -https://github.com/openssl/openssl/commit/f1b12b8713a739f27d74e6911580b2e70aea2fa4
258 -https://github.com/openssl/openssl/commit/8abfe72e8c1de1b95f50aa0d9134803b4d00070f
259 -
260 ---- a/crypto/dsa/dsa_ossl.c
261 -+++ b/crypto/dsa/dsa_ossl.c
262 -@@ -9,6 +9,7 @@
263 -
264 - #include <stdio.h>
265 - #include "internal/cryptlib.h"
266 -+#include "internal/bn_int.h"
267 - #include <openssl/bn.h>
268 - #include <openssl/sha.h>
269 - #include "dsa_locl.h"
270 -@@ -23,6 +24,8 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len,
271 - DSA_SIG *sig, DSA *dsa);
272 - static int dsa_init(DSA *dsa);
273 - static int dsa_finish(DSA *dsa);
274 -+static BIGNUM *dsa_mod_inverse_fermat(const BIGNUM *k, const BIGNUM *q,
275 -+ BN_CTX *ctx);
276 -
277 - static DSA_METHOD openssl_dsa_meth = {
278 - "OpenSSL DSA method",
279 -@@ -178,9 +181,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
280 - {
281 - BN_CTX *ctx = NULL;
282 - BIGNUM *k, *kinv = NULL, *r = *rp;
283 -- BIGNUM *l, *m;
284 -+ BIGNUM *l;
285 - int ret = 0;
286 -- int q_bits;
287 -+ int q_bits, q_words;
288 -
289 - if (!dsa->p || !dsa->q || !dsa->g) {
290 - DSAerr(DSA_F_DSA_SIGN_SETUP, DSA_R_MISSING_PARAMETERS);
291 -@@ -189,8 +192,7 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
292 -
293 - k = BN_new();
294 - l = BN_new();
295 -- m = BN_new();
296 -- if (k == NULL || l == NULL || m == NULL)
297 -+ if (k == NULL || l == NULL)
298 - goto err;
299 -
300 - if (ctx_in == NULL) {
301 -@@ -201,9 +203,9 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
302 -
303 - /* Preallocate space */
304 - q_bits = BN_num_bits(dsa->q);
305 -- if (!BN_set_bit(k, q_bits)
306 -- || !BN_set_bit(l, q_bits)
307 -- || !BN_set_bit(m, q_bits))
308 -+ q_words = bn_get_top(dsa->q);
309 -+ if (!bn_wexpand(k, q_words + 2)
310 -+ || !bn_wexpand(l, q_words + 2))
311 - goto err;
312 -
313 - /* Get random k */
314 -@@ -238,14 +240,17 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
315 - * small timing information leakage. We then choose the sum that is
316 - * one bit longer than the modulus.
317 - *
318 -- * TODO: revisit the BN_copy aiming for a memory access agnostic
319 -- * conditional copy.
320 -+ * There are some concerns about the efficacy of doing this. More
321 -+ * specificly refer to the discussion starting with:
322 -+ * https://github.com/openssl/openssl/pull/7486#discussion_r228323705
323 -+ * The fix is to rework BN so these gymnastics aren't required.
324 - */
325 - if (!BN_add(l, k, dsa->q)
326 -- || !BN_add(m, l, dsa->q)
327 -- || !BN_copy(k, BN_num_bits(l) > q_bits ? l : m))
328 -+ || !BN_add(k, l, dsa->q))
329 - goto err;
330 -
331 -+ BN_consttime_swap(BN_is_bit_set(l, q_bits), k, l, q_words + 2);
332 -+
333 - if ((dsa)->meth->bn_mod_exp != NULL) {
334 - if (!dsa->meth->bn_mod_exp(dsa, r, dsa->g, k, dsa->p, ctx,
335 - dsa->method_mont_p))
336 -@@ -258,8 +263,8 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
337 - if (!BN_mod(r, r, dsa->q, ctx))
338 - goto err;
339 -
340 -- /* Compute part of 's = inv(k) (m + xr) mod q' */
341 -- if ((kinv = BN_mod_inverse(NULL, k, dsa->q, ctx)) == NULL)
342 -+ /* Compute part of 's = inv(k) (m + xr) mod q' */
343 -+ if ((kinv = dsa_mod_inverse_fermat(k, dsa->q, ctx)) == NULL)
344 - goto err;
345 -
346 - BN_clear_free(*kinvp);
347 -@@ -273,7 +278,6 @@ static int dsa_sign_setup(DSA *dsa, BN_CTX *ctx_in,
348 - BN_CTX_free(ctx);
349 - BN_clear_free(k);
350 - BN_clear_free(l);
351 -- BN_clear_free(m);
352 - return ret;
353 - }
354 -
355 -@@ -393,3 +397,31 @@ static int dsa_finish(DSA *dsa)
356 - BN_MONT_CTX_free(dsa->method_mont_p);
357 - return 1;
358 - }
359 -+
360 -+/*
361 -+ * Compute the inverse of k modulo q.
362 -+ * Since q is prime, Fermat's Little Theorem applies, which reduces this to
363 -+ * mod-exp operation. Both the exponent and modulus are public information
364 -+ * so a mod-exp that doesn't leak the base is sufficient. A newly allocated
365 -+ * BIGNUM is returned which the caller must free.
366 -+ */
367 -+static BIGNUM *dsa_mod_inverse_fermat(const BIGNUM *k, const BIGNUM *q,
368 -+ BN_CTX *ctx)
369 -+{
370 -+ BIGNUM *res = NULL;
371 -+ BIGNUM *r, *e;
372 -+
373 -+ if ((r = BN_new()) == NULL)
374 -+ return NULL;
375 -+
376 -+ BN_CTX_start(ctx);
377 -+ if ((e = BN_CTX_get(ctx)) != NULL
378 -+ && BN_set_word(r, 2)
379 -+ && BN_sub(e, q, r)
380 -+ && BN_mod_exp_mont(r, k, e, q, ctx, NULL))
381 -+ res = r;
382 -+ else
383 -+ BN_free(r);
384 -+ BN_CTX_end(ctx);
385 -+ return res;
386 -+}
387
388 diff --git a/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch b/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch
389 deleted file mode 100644
390 index 295f5dbe8d8..00000000000
391 --- a/dev-libs/openssl/files/openssl-1.1.1-CVE-2018-0735.patch
392 +++ /dev/null
393 @@ -1,44 +0,0 @@
394 -From b1d6d55ece1c26fa2829e2b819b038d7b6d692b4 Mon Sep 17 00:00:00 2001
395 -From: Pauli <paul.dale@××××××.com>
396 -Date: Fri, 26 Oct 2018 10:54:58 +1000
397 -Subject: [PATCH] Timing vulnerability in ECDSA signature generation
398 - (CVE-2018-0735)
399 -
400 -Preallocate an extra limb for some of the big numbers to avoid a reallocation
401 -that can potentially provide a side channel.
402 -
403 -Reviewed-by: Bernd Edlinger <bernd.edlinger@×××××××.de>
404 -(Merged from https://github.com/openssl/openssl/pull/7486)
405 -
406 -(cherry picked from commit 99540ec79491f59ed8b46b4edf130e17dc907f52)
407 ----
408 - crypto/ec/ec_mult.c | 6 +++---
409 - 1 file changed, 3 insertions(+), 3 deletions(-)
410 -
411 -diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
412 -index 7e1b3650e7..0e0a5e1394 100644
413 ---- a/crypto/ec/ec_mult.c
414 -+++ b/crypto/ec/ec_mult.c
415 -@@ -206,8 +206,8 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
416 - */
417 - cardinality_bits = BN_num_bits(cardinality);
418 - group_top = bn_get_top(cardinality);
419 -- if ((bn_wexpand(k, group_top + 1) == NULL)
420 -- || (bn_wexpand(lambda, group_top + 1) == NULL)) {
421 -+ if ((bn_wexpand(k, group_top + 2) == NULL)
422 -+ || (bn_wexpand(lambda, group_top + 2) == NULL)) {
423 - ECerr(EC_F_EC_SCALAR_MUL_LADDER, ERR_R_BN_LIB);
424 - goto err;
425 - }
426 -@@ -244,7 +244,7 @@ int ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
427 - * k := scalar + 2*cardinality
428 - */
429 - kbit = BN_is_bit_set(lambda, cardinality_bits);
430 -- BN_consttime_swap(kbit, k, lambda, group_top + 1);
431 -+ BN_consttime_swap(kbit, k, lambda, group_top + 2);
432 -
433 - group_top = bn_get_top(group->field);
434 - if ((bn_wexpand(s->X, group_top) == NULL)
435 ---
436 -2.19.1
437 -
438
439 diff --git a/dev-libs/openssl/openssl-1.1.1-r3.ebuild b/dev-libs/openssl/openssl-1.0.2q.ebuild
440 similarity index 72%
441 copy from dev-libs/openssl/openssl-1.1.1-r3.ebuild
442 copy to dev-libs/openssl/openssl-1.0.2q.ebuild
443 index 391d0bc059c..a073a353fb9 100644
444 --- a/dev-libs/openssl/openssl-1.1.1-r3.ebuild
445 +++ b/dev-libs/openssl/openssl-1.0.2q.ebuild
446 @@ -3,22 +3,33 @@
447
448 EAPI="6"
449
450 -inherit flag-o-matic toolchain-funcs multilib multilib-minimal
451 +inherit eutils flag-o-matic toolchain-funcs multilib multilib-minimal
452
453 +# openssl-1.0.2-patches-1.6 contain additional CVE patches
454 +# which got fixed with this release.
455 +# Please use 1.7 version number when rolling a new tarball!
456 +PATCH_SET="openssl-1.0.2-patches-1.5"
457 MY_P=${P/_/-}
458 DESCRIPTION="full-strength general purpose cryptography library (including SSL and TLS)"
459 HOMEPAGE="https://www.openssl.org/"
460 -SRC_URI="mirror://openssl/source/${MY_P}.tar.gz"
461 +SRC_URI="mirror://openssl/source/${MY_P}.tar.gz
462 + !vanilla? (
463 + mirror://gentoo/${PATCH_SET}.tar.xz
464 + https://dev.gentoo.org/~chutzpah/dist/${PN}/${PATCH_SET}.tar.xz
465 + https://dev.gentoo.org/~whissi/dist/${PN}/${PATCH_SET}.tar.xz
466 + https://dev.gentoo.org/~polynomial-c/dist/${PATCH_SET}.tar.xz
467 + )"
468
469 LICENSE="openssl"
470 -SLOT="0/1.1" # .so version of libssl/libcrypto
471 -[[ "${PV}" = *_pre* ]] || \
472 +SLOT="0"
473 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
474 -IUSE="+asm bindist elibc_musl rfc3779 sctp cpu_flags_x86_sse2 sslv3 static-libs test tls-heartbeat vanilla zlib"
475 +IUSE="+asm bindist gmp kerberos rfc3779 sctp cpu_flags_x86_sse2 sslv2 +sslv3 static-libs test +tls-heartbeat vanilla zlib"
476 RESTRICT="!bindist? ( bindist )"
477
478 RDEPEND=">=app-misc/c_rehash-1.7-r1
479 - zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )"
480 + gmp? ( >=dev-libs/gmp-5.1.3-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
481 + zlib? ( >=sys-libs/zlib-1.2.8-r1[static-libs(+)?,${MULTILIB_USEDEP}] )
482 + kerberos? ( >=app-crypt/mit-krb5-1.11.4[${MULTILIB_USEDEP}] )"
483 DEPEND="${RDEPEND}
484 >=dev-lang/perl-5
485 sctp? ( >=net-misc/lksctp-tools-1.0.12 )
486 @@ -34,12 +45,14 @@ PDEPEND="app-misc/ca-certificates"
487 SOURCE1=hobble-openssl
488 SOURCE12=ec_curve.c
489 SOURCE13=ectest.c
490 -PATCH37=openssl-1.1.1-ec-curves.patch
491 +# These are ported instead
492 +#PATCH1=openssl-1.1.0-build.patch # Fixes EVP testcase for EC
493 +#PATCH37=openssl-1.1.0-ec-curves.patch
494 FEDORA_GIT_BASE='https://src.fedoraproject.org/cgit/rpms/openssl.git/plain/'
495 -FEDORA_GIT_BRANCH='f29'
496 +FEDORA_GIT_BRANCH='f25'
497 FEDORA_SRC_URI=()
498 -FEDORA_SOURCE=( ${SOURCE1} ${SOURCE12} ${SOURCE13} )
499 -FEDORA_PATCH=( ${PATCH37} )
500 +FEDORA_SOURCE=( $SOURCE1 $SOURCE12 $SOURCE13 )
501 +FEDORA_PATCH=( $PATCH1 $PATCH37 )
502 for i in "${FEDORA_SOURCE[@]}" ; do
503 FEDORA_SRC_URI+=( "${FEDORA_GIT_BASE}/${i}?h=${FEDORA_GIT_BRANCH} -> ${P}_${i}" )
504 done
505 @@ -54,11 +67,6 @@ MULTILIB_WRAPPED_HEADERS=(
506 usr/include/openssl/opensslconf.h
507 )
508
509 -PATCHES=(
510 - "${FILESDIR}"/${P}-CVE-2018-0734.patch
511 - "${FILESDIR}"/${P}-CVE-2018-0735.patch
512 -)
513 -
514 src_prepare() {
515 if use bindist; then
516 # This just removes the prefix, and puts it into WORKDIR like the RPM.
517 @@ -68,14 +76,15 @@ src_prepare() {
518 # .spec %prep
519 bash "${WORKDIR}"/"${SOURCE1}" || die
520 cp -f "${WORKDIR}"/"${SOURCE12}" "${S}"/crypto/ec/ || die
521 - cp -f "${WORKDIR}"/"${SOURCE13}" "${S}"/test/ || die
522 + cp -f "${WORKDIR}"/"${SOURCE13}" "${S}"/crypto/ec/ || die # Moves to test/ in OpenSSL-1.1
523 for i in "${FEDORA_PATCH[@]}" ; do
524 eapply "${DISTDIR}"/"${i}"
525 done
526 + eapply "${FILESDIR}"/openssl-1.0.2p-hobble-ecc.patch
527 # Also see the configure parts below:
528 # enable-ec \
529 # $(use_ssl !bindist ec2m) \
530 -
531 + # $(use_ssl !bindist srp) \
532 fi
533
534 # keep this in sync with app-misc/c_rehash
535 @@ -86,25 +95,31 @@ src_prepare() {
536 rm -f Makefile
537
538 if ! use vanilla ; then
539 - if [[ $(declare -p PATCHES 2>/dev/null) == "declare -a"* ]] ; then
540 - [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"
541 - fi
542 + eapply "${WORKDIR}"/patch/*.patch
543 fi
544
545 - eapply_user #332661
546 + eapply_user
547
548 + # disable fips in the build
549 # make sure the man pages are suffixed #302165
550 # don't bother building man pages if they're disabled
551 - # Make DOCDIR Gentoo compliant
552 sed -i \
553 + -e '/DIRS/s: fips : :g' \
554 -e '/^MANSUFFIX/s:=.*:=ssl:' \
555 -e '/^MAKEDEPPROG/s:=.*:=$(CC):' \
556 -e $(has noman FEATURES \
557 && echo '/^install:/s:install_docs::' \
558 || echo '/^MANDIR=/s:=.*:='${EPREFIX%/}'/usr/share/man:') \
559 - -e "/^DOCDIR/s@\$(BASENAME)@&-${PVR}@" \
560 - Configurations/unix-Makefile.tmpl \
561 + Makefile.org \
562 || die
563 + # show the actual commands in the log
564 + sed -i '/^SET_X/s:=.*:=set -x:' Makefile.shared
565 +
566 + # since we're forcing $(CC) as makedep anyway, just fix
567 + # the conditional as always-on
568 + # helps clang (#417795), and versioned gcc (#499818)
569 + # this breaks build with 1.0.2p, not sure if it is needed anymore
570 + #sed -i 's/expr.*MAKEDEPEND.*;/true;/' util/domd || die
571
572 # quiet out unknown driver argument warnings since openssl
573 # doesn't have well-split CFLAGS and we're making it even worse
574 @@ -119,16 +134,7 @@ src_prepare() {
575 append-flags $(test-flags-CC -Wa,--noexecstack)
576 append-cppflags -DOPENSSL_NO_BUF_FREELISTS
577
578 - # Prefixify Configure shebang (#141906)
579 - sed \
580 - -e "1s,/usr/bin/env,${EPREFIX%/}&," \
581 - -i Configure || die
582 - # Remove test target when FEATURES=test isn't set
583 - if ! use test ; then
584 - sed \
585 - -e '/^$config{dirs}/s@ "test",@@' \
586 - -i Configure || die
587 - fi
588 + sed -i '1s,^:$,#!'${EPREFIX%/}'/usr/bin/perl,' Configure #141906
589 # The config script does stupid stuff to prompt the user. Kill it.
590 sed -i '/stty -icanon min 0 time 50; read waste/d' config || die
591 ./config --test-sanity || die "I AM NOT SANE"
592 @@ -166,15 +172,18 @@ multilib_src_configure() {
593 # fi
594 #fi
595
596 + # https://github.com/openssl/openssl/issues/2286
597 + if use ia64 ; then
598 + replace-flags -g3 -g2
599 + replace-flags -ggdb3 -ggdb2
600 + fi
601 +
602 local sslout=$(./gentoo.config)
603 einfo "Use configuration ${sslout:-(openssl knows best)}"
604 local config="Configure"
605 [[ -z ${sslout} ]] && config="config"
606
607 - # Fedora hobbled-EC needs 'no-ec2m'
608 - # 'srp' was restricted until early 2017 as well.
609 - # "disable-deprecated" option breaks too many consumers.
610 - # Don't set it without thorough revdeps testing.
611 + # Fedora hobbled-EC needs 'no-ec2m', 'no-srp'
612 echoit \
613 ./${config} \
614 ${sslout} \
615 @@ -182,17 +191,19 @@ multilib_src_configure() {
616 enable-camellia \
617 enable-ec \
618 $(use_ssl !bindist ec2m) \
619 - enable-srp \
620 - $(use elibc_musl && echo "no-async") \
621 + $(use_ssl !bindist srp) \
622 ${ec_nistp_64_gcc_128} \
623 enable-idea \
624 enable-mdc2 \
625 enable-rc5 \
626 - $(use_ssl sslv3 ssl3) \
627 - $(use_ssl sslv3 ssl3-method) \
628 + enable-tlsext \
629 $(use_ssl asm) \
630 + $(use_ssl gmp gmp -lgmp) \
631 + $(use_ssl kerberos krb5 --with-krb5-flavor=${krb5}) \
632 $(use_ssl rfc3779) \
633 $(use_ssl sctp) \
634 + $(use_ssl sslv2 ssl2) \
635 + $(use_ssl sslv3 ssl3) \
636 $(use_ssl tls-heartbeat heartbeats) \
637 $(use_ssl zlib) \
638 --prefix="${EPREFIX%/}"/usr \
639 @@ -202,27 +213,28 @@ multilib_src_configure() {
640 || die
641
642 # Clean out hardcoded flags that openssl uses
643 - # Fix quoting for sed
644 - local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
645 - -e 's:^CFLAGS=::' \
646 + local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
647 + -e 's:^CFLAG=::' \
648 -e 's:-fomit-frame-pointer ::g' \
649 -e 's:-O[0-9] ::g' \
650 -e 's:-march=[-a-z0-9]* ::g' \
651 -e 's:-mcpu=[-a-z0-9]* ::g' \
652 -e 's:-m[a-z0-9]* ::g' \
653 - -e 's:\\:\\\\:g' \
654 )
655 sed -i \
656 - -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
657 - -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
658 + -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
659 + -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
660 Makefile || die
661 }
662
663 multilib_src_compile() {
664 # depend is needed to use $confopts; it also doesn't matter
665 # that it's -j1 as the code itself serializes subdirs
666 - emake -j1 depend
667 + emake -j1 V=1 depend
668 emake all
669 + # rehash is needed to prep the certs/ dir; do this
670 + # separately to avoid parallel build issues.
671 + emake rehash
672 }
673
674 multilib_src_test() {
675 @@ -236,7 +248,7 @@ multilib_src_install() {
676 mkdir "${ED%/}"/usr || die
677 fi
678
679 - emake DESTDIR="${D%/}" install
680 + emake INSTALL_PREFIX="${D%/}" install
681 }
682
683 multilib_src_install_all() {
684 @@ -244,20 +256,25 @@ multilib_src_install_all() {
685 # we provide a shell version via app-misc/c_rehash
686 rm "${ED%/}"/usr/bin/c_rehash || die
687
688 - dodoc CHANGES* FAQ NEWS README doc/*.txt doc/${PN}-c-indent.el
689 + local -a DOCS=( CHANGES* FAQ NEWS README doc/*.txt doc/c-indentation.el )
690 + einstalldocs
691 +
692 + use rfc3779 && dodoc engines/ccgost/README.gost
693
694 # This is crappy in that the static archives are still built even
695 # when USE=static-libs. But this is due to a failing in the openssl
696 # build system: the static archives are built as PIC all the time.
697 # Only way around this would be to manually configure+compile openssl
698 # twice; once with shared lib support enabled and once without.
699 - use static-libs || rm -f "${ED%/}"/usr/lib*/lib*.a
700 + use static-libs || rm -f "${ED}"/usr/lib*/lib*.a
701
702 # create the certs directory
703 - keepdir ${SSL_CNF_DIR}/certs
704 + dodir ${SSL_CNF_DIR}/certs
705 + cp -RP certs/* "${ED}"${SSL_CNF_DIR}/certs/ || die
706 + rm -r "${ED}"${SSL_CNF_DIR}/certs/{demo,expired}
707
708 # Namespace openssl programs to prevent conflicts with other man pages
709 - cd "${ED%/}"/usr/share/man || die
710 + cd "${ED}"/usr/share/man
711 local m d s
712 for m in $(find . -type f | xargs grep -L '#include') ; do
713 d=${m%/*} ; d=${d#./} ; m=${m##*/}
714 @@ -272,7 +289,6 @@ multilib_src_install_all() {
715 for s in $(find -L ${d} -type l) ; do
716 s=${s##*/}
717 rm -f ${d}/${s}
718 - # We don't want to "|| die" here
719 ln -s ssl-${m} ${d}/ssl-${s}
720 ln -s ssl-${s} ${d}/openssl-${s}
721 done
722 @@ -280,7 +296,7 @@ multilib_src_install_all() {
723 [[ -n $(find -L ${d} -type l) ]] && die "broken manpage links found :("
724
725 dodir /etc/sandbox.d #254521
726 - echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED%/}"/etc/sandbox.d/10openssl
727 + echo 'SANDBOX_PREDICT="/dev/crypto"' > "${ED}"/etc/sandbox.d/10openssl
728
729 diropts -m0700
730 keepdir ${SSL_CNF_DIR}/private
731
732 diff --git a/dev-libs/openssl/openssl-1.1.0i-r3.ebuild b/dev-libs/openssl/openssl-1.1.0j.ebuild
733 similarity index 99%
734 rename from dev-libs/openssl/openssl-1.1.0i-r3.ebuild
735 rename to dev-libs/openssl/openssl-1.1.0j.ebuild
736 index 7837bf78175..e46218cc483 100644
737 --- a/dev-libs/openssl/openssl-1.1.0i-r3.ebuild
738 +++ b/dev-libs/openssl/openssl-1.1.0j.ebuild
739 @@ -56,8 +56,6 @@ MULTILIB_WRAPPED_HEADERS=(
740
741 PATCHES=(
742 "${FILESDIR}"/${PN}-1.0.2a-x32-asm.patch #542618
743 - "${FILESDIR}"/${P}-CVE-2018-0734.patch
744 - "${FILESDIR}"/${P}-CVE-2018-0735.patch
745 )
746
747 src_prepare() {
748
749 diff --git a/dev-libs/openssl/openssl-1.1.1-r3.ebuild b/dev-libs/openssl/openssl-1.1.1a.ebuild
750 similarity index 99%
751 rename from dev-libs/openssl/openssl-1.1.1-r3.ebuild
752 rename to dev-libs/openssl/openssl-1.1.1a.ebuild
753 index 391d0bc059c..5b5bb76c6b7 100644
754 --- a/dev-libs/openssl/openssl-1.1.1-r3.ebuild
755 +++ b/dev-libs/openssl/openssl-1.1.1a.ebuild
756 @@ -54,11 +54,6 @@ MULTILIB_WRAPPED_HEADERS=(
757 usr/include/openssl/opensslconf.h
758 )
759
760 -PATCHES=(
761 - "${FILESDIR}"/${P}-CVE-2018-0734.patch
762 - "${FILESDIR}"/${P}-CVE-2018-0735.patch
763 -)
764 -
765 src_prepare() {
766 if use bindist; then
767 # This just removes the prefix, and puts it into WORKDIR like the RPM.