1 |
commit: 09301ae9f547c534d3120f2b24f376f7931b6ec6 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 23 09:28:17 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 23 09:29:27 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09301ae9 |
7 |
|
8 |
dev-python/pycrypto: Remove last-rited pkg |
9 |
|
10 |
Closes: https://bugs.gentoo.org/703682 |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
dev-python/pycrypto/Manifest | 1 - |
14 |
.../files/pycrypto-2.6.1-CVE-2013-7459.patch | 88 ---------------------- |
15 |
.../files/pycrypto-2.6.1-cross-compile.patch | 13 ---- |
16 |
dev-python/pycrypto/metadata.xml | 34 --------- |
17 |
dev-python/pycrypto/pycrypto-2.6.1-r2.ebuild | 76 ------------------- |
18 |
profiles/base/package.use.mask | 1 - |
19 |
profiles/package.mask | 6 -- |
20 |
7 files changed, 219 deletions(-) |
21 |
|
22 |
diff --git a/dev-python/pycrypto/Manifest b/dev-python/pycrypto/Manifest |
23 |
deleted file mode 100644 |
24 |
index 785c20a83c4..00000000000 |
25 |
--- a/dev-python/pycrypto/Manifest |
26 |
+++ /dev/null |
27 |
@@ -1 +0,0 @@ |
28 |
-DIST pycrypto-2.6.1.tar.gz 446240 BLAKE2B 89c9cc5b8cbd446364bd56c170c2733b960ec269a6691085392b3cc0ebc2eb244721f6763ed72a1254f90bfaadee2cc1a8446865a95fca19ffb36700d89711a9 SHA512 20a4aed4dac4e9e61d773ebc1d48ea577e9870c33f396be53d075a9bf8487d93e75e200179882d81e452efd0f6751789bac434f6f431b3e7c1c8ef9dba392847 |
29 |
|
30 |
diff --git a/dev-python/pycrypto/files/pycrypto-2.6.1-CVE-2013-7459.patch b/dev-python/pycrypto/files/pycrypto-2.6.1-CVE-2013-7459.patch |
31 |
deleted file mode 100644 |
32 |
index 9850f034051..00000000000 |
33 |
--- a/dev-python/pycrypto/files/pycrypto-2.6.1-CVE-2013-7459.patch |
34 |
+++ /dev/null |
35 |
@@ -1,88 +0,0 @@ |
36 |
-From 8dbe0dc3eea5c689d4f76b37b93fe216cf1f00d4 Mon Sep 17 00:00:00 2001 |
37 |
-From: Legrandin <helderijs@×××××.com> |
38 |
-Date: Sun, 22 Dec 2013 22:24:46 +0100 |
39 |
-Subject: [PATCH] Throw exception when IV is used with ECB or CTR |
40 |
- |
41 |
-The IV parameter is currently ignored when initializing |
42 |
-a cipher in ECB or CTR mode. |
43 |
- |
44 |
-For CTR mode, it is confusing: it takes some time to see |
45 |
-that a different parameter is needed (the counter). |
46 |
- |
47 |
-For ECB mode, it is outright dangerous. |
48 |
- |
49 |
-This patch forces an exception to be raised. |
50 |
---- |
51 |
- lib/Crypto/SelfTest/Cipher/common.py | 31 +++++++++++++++++++++++-------- |
52 |
- src/block_template.c | 11 +++++++++++ |
53 |
- 2 files changed, 34 insertions(+), 8 deletions(-) |
54 |
- |
55 |
-diff --git a/lib/Crypto/SelfTest/Cipher/common.py b/lib/Crypto/SelfTest/Cipher/common.py |
56 |
-index 420b6ff..a5f8a88 100644 |
57 |
---- a/lib/Crypto/SelfTest/Cipher/common.py |
58 |
-+++ b/lib/Crypto/SelfTest/Cipher/common.py |
59 |
-@@ -239,19 +239,34 @@ def shortDescription(self): |
60 |
- return """%s .decrypt() output of .encrypt() should not be garbled""" % (self.module_name,) |
61 |
- |
62 |
- def runTest(self): |
63 |
-- for mode in (self.module.MODE_ECB, self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB, self.module.MODE_OPENPGP): |
64 |
-+ |
65 |
-+ ## ECB mode |
66 |
-+ mode = self.module.MODE_ECB |
67 |
-+ encryption_cipher = self.module.new(a2b_hex(self.key), mode) |
68 |
-+ ciphertext = encryption_cipher.encrypt(self.plaintext) |
69 |
-+ decryption_cipher = self.module.new(a2b_hex(self.key), mode) |
70 |
-+ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) |
71 |
-+ self.assertEqual(self.plaintext, decrypted_plaintext) |
72 |
-+ |
73 |
-+ ## OPENPGP mode |
74 |
-+ mode = self.module.MODE_OPENPGP |
75 |
-+ encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) |
76 |
-+ eiv_ciphertext = encryption_cipher.encrypt(self.plaintext) |
77 |
-+ eiv = eiv_ciphertext[:self.module.block_size+2] |
78 |
-+ ciphertext = eiv_ciphertext[self.module.block_size+2:] |
79 |
-+ decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) |
80 |
-+ decrypted_plaintext = decryption_cipher.decrypt(ciphertext) |
81 |
-+ self.assertEqual(self.plaintext, decrypted_plaintext) |
82 |
-+ |
83 |
-+ ## All other non-AEAD modes (but CTR) |
84 |
-+ for mode in (self.module.MODE_CBC, self.module.MODE_CFB, self.module.MODE_OFB): |
85 |
- encryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) |
86 |
- ciphertext = encryption_cipher.encrypt(self.plaintext) |
87 |
-- |
88 |
-- if mode != self.module.MODE_OPENPGP: |
89 |
-- decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) |
90 |
-- else: |
91 |
-- eiv = ciphertext[:self.module.block_size+2] |
92 |
-- ciphertext = ciphertext[self.module.block_size+2:] |
93 |
-- decryption_cipher = self.module.new(a2b_hex(self.key), mode, eiv) |
94 |
-+ decryption_cipher = self.module.new(a2b_hex(self.key), mode, self.iv) |
95 |
- decrypted_plaintext = decryption_cipher.decrypt(ciphertext) |
96 |
- self.assertEqual(self.plaintext, decrypted_plaintext) |
97 |
- |
98 |
-+ |
99 |
- class PGPTest(unittest.TestCase): |
100 |
- def __init__(self, module, params): |
101 |
- unittest.TestCase.__init__(self) |
102 |
-diff --git a/src/block_template.c b/src/block_template.c |
103 |
-index f940e0e..d555ceb 100644 |
104 |
---- a/src/block_template.c |
105 |
-+++ b/src/block_template.c |
106 |
-@@ -170,6 +170,17 @@ ALGnew(PyObject *self, PyObject *args, PyObject *kwdict) |
107 |
- "Key cannot be the null string"); |
108 |
- return NULL; |
109 |
- } |
110 |
-+ if (IVlen != 0 && mode == MODE_ECB) |
111 |
-+ { |
112 |
-+ PyErr_Format(PyExc_ValueError, "ECB mode does not use IV"); |
113 |
-+ return NULL; |
114 |
-+ } |
115 |
-+ if (IVlen != 0 && mode == MODE_CTR) |
116 |
-+ { |
117 |
-+ PyErr_Format(PyExc_ValueError, |
118 |
-+ "CTR mode needs counter parameter, not IV"); |
119 |
-+ return NULL; |
120 |
-+ } |
121 |
- if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR) |
122 |
- { |
123 |
- PyErr_Format(PyExc_ValueError, |
124 |
|
125 |
diff --git a/dev-python/pycrypto/files/pycrypto-2.6.1-cross-compile.patch b/dev-python/pycrypto/files/pycrypto-2.6.1-cross-compile.patch |
126 |
deleted file mode 100644 |
127 |
index 2ce24a49cc7..00000000000 |
128 |
--- a/dev-python/pycrypto/files/pycrypto-2.6.1-cross-compile.patch |
129 |
+++ /dev/null |
130 |
@@ -1,13 +0,0 @@ |
131 |
-do not hardcode -I/usr/include as it's useless and breaks cross-compiles |
132 |
- |
133 |
---- a/setup.py |
134 |
-+++ b/setup.py |
135 |
-@@ -370,7 +370,7 @@ kw = {'name':"pycrypto", |
136 |
- 'ext_modules': plat_ext + [ |
137 |
- # _fastmath (uses GNU mp library) |
138 |
- Extension("Crypto.PublicKey._fastmath", |
139 |
-- include_dirs=['src/','/usr/include/'], |
140 |
-+ include_dirs=['src/'], |
141 |
- libraries=['gmp'], |
142 |
- sources=["src/_fastmath.c"]), |
143 |
- |
144 |
|
145 |
diff --git a/dev-python/pycrypto/metadata.xml b/dev-python/pycrypto/metadata.xml |
146 |
deleted file mode 100644 |
147 |
index e14ce669180..00000000000 |
148 |
--- a/dev-python/pycrypto/metadata.xml |
149 |
+++ /dev/null |
150 |
@@ -1,34 +0,0 @@ |
151 |
-<?xml version="1.0" encoding="UTF-8"?> |
152 |
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
153 |
-<pkgmetadata> |
154 |
- <maintainer type="project"> |
155 |
- <email>python@g.o</email> |
156 |
- <name>Python</name> |
157 |
- </maintainer> |
158 |
- <longdescription> |
159 |
- The Python Cryptography Toolkit is a collection of cryptographic |
160 |
- algorithms and protocols, implemented for use from Python. Among |
161 |
- the contents of the package: |
162 |
- |
163 |
- * Hash functions: MD2, MD4, RIPEMD, SHA256. |
164 |
- * Block encryption algorithms: AES, ARC2, Blowfish, CAST, DES, Triple-DES, IDEA, RC5. |
165 |
- * Stream encryption algorithms: ARC4, simple XOR. |
166 |
- * Public-key algorithms: RSA, DSA, ElGamal, qNEW. |
167 |
- * Protocols: All-or-nothing transforms, chaffing/winnowing. |
168 |
- * Miscellaneous: RFC1751 module for converting 128-key keys into a set of English words, primality testing. |
169 |
- * Some demo programs (currently all quite old and outdated). |
170 |
- </longdescription> |
171 |
- <longdescription lang="ja"> |
172 |
- このPython言語のクリプトグラフィー・ツールキットは、暗号手法のアルゴリズムとプロ |
173 |
- トコルの集合で、Python言語から利用されるための実装です。このパッケージ内容は以下 |
174 |
- です。 |
175 |
- |
176 |
- * Hash ファンクション: MD2, MD4, RIPEMD, SHA256. |
177 |
- * ブロック・エンクリプション・アルゴリズム: AES, ARC2, Blowfish, CAST, DES, Triple-DES, IDEA, RC5. |
178 |
- * ストリーム・エンクリプション・アルゴリズム: ARC4, simple XOR. |
179 |
- * 公開鍵アルゴリズム: RSA, DSA, ElGamal, qNEW. |
180 |
- * プロトコル: All-or-nothing transforms, chaffing/winnowing. |
181 |
- * その他: RFC1751 module for converting 128-key keys into a set of English words, primality testing. |
182 |
- * デモ・プログラム(現在では完全に古く時代遅れなもの) |
183 |
- </longdescription> |
184 |
-</pkgmetadata> |
185 |
|
186 |
diff --git a/dev-python/pycrypto/pycrypto-2.6.1-r2.ebuild b/dev-python/pycrypto/pycrypto-2.6.1-r2.ebuild |
187 |
deleted file mode 100644 |
188 |
index 2c3100844ce..00000000000 |
189 |
--- a/dev-python/pycrypto/pycrypto-2.6.1-r2.ebuild |
190 |
+++ /dev/null |
191 |
@@ -1,76 +0,0 @@ |
192 |
-# Copyright 1999-2020 Gentoo Authors |
193 |
-# Distributed under the terms of the GNU General Public License v2 |
194 |
- |
195 |
-EAPI=7 |
196 |
- |
197 |
-PYTHON_COMPAT=( python2_7 python3_{6,7} ) |
198 |
-PYTHON_REQ_USE="threads(+)" |
199 |
- |
200 |
-inherit distutils-r1 flag-o-matic |
201 |
- |
202 |
-DESCRIPTION="Python Cryptography Toolkit" |
203 |
-HOMEPAGE="https://www.dlitz.net/software/pycrypto/ |
204 |
- https://pypi.org/project/pycrypto/" |
205 |
-SRC_URI="http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/${P}.tar.gz" |
206 |
- |
207 |
-LICENSE="PSF-2 public-domain" |
208 |
-SLOT="0" |
209 |
-KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86 ~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x86-solaris" |
210 |
-IUSE="doc +gmp test" |
211 |
-RESTRICT="!test? ( test )" |
212 |
- |
213 |
-RDEPEND="gmp? ( dev-libs/gmp:0= )" |
214 |
-DEPEND="${RDEPEND} |
215 |
- doc? ( |
216 |
- dev-python/docutils[${PYTHON_USEDEP}] |
217 |
- $(python_gen_cond_dep '>=dev-python/epydoc-3[${PYTHON_USEDEP}]' 'python2*') |
218 |
- )" |
219 |
- |
220 |
-REQUIRED_USE="test? ( gmp )" |
221 |
- |
222 |
-DOCS=( ACKS ChangeLog README TODO ) |
223 |
-PATCHES=( |
224 |
- "${FILESDIR}"/${P}-cross-compile.patch |
225 |
- "${FILESDIR}"/${P}-CVE-2013-7459.patch |
226 |
-) |
227 |
- |
228 |
-python_prepare_all() { |
229 |
- # Fix Crypto.PublicKey.RSA._RSAobj.exportKey(format="OpenSSH") with Python 3 |
230 |
- # https://github.com/dlitz/pycrypto/commit/ab25c6fe95ee92fac3187dcd90e0560ccacb084a |
231 |
- sed \ |
232 |
- -e "/keyparts =/s/'ssh-rsa'/b('ssh-rsa')/" \ |
233 |
- -e "s/keystring = ''.join/keystring = b('').join/" \ |
234 |
- -e "s/return 'ssh-rsa '/return b('ssh-rsa ')/" \ |
235 |
- -i lib/Crypto/PublicKey/RSA.py || die |
236 |
- |
237 |
- distutils-r1_python_prepare_all |
238 |
-} |
239 |
- |
240 |
-python_configure_all() { |
241 |
- # the configure does not interact with python in any way, |
242 |
- # it just sets up the C header file. |
243 |
- econf \ |
244 |
- $(use_with gmp) \ |
245 |
- --without-mpir |
246 |
-} |
247 |
- |
248 |
-python_compile_all() { |
249 |
- if use doc; then |
250 |
- rst2html.py Doc/pycrypt.rst > Doc/index.html || die |
251 |
- epydoc --config=Doc/epydoc-config --exclude-introspect="^Crypto\.(Random\.OSRNG\.nt|Util\.winrandom)$" || die |
252 |
- HTML_DOCS=( Doc/apidoc/. Doc/index.html ) |
253 |
- fi |
254 |
-} |
255 |
- |
256 |
-python_compile() { |
257 |
- if ! python_is_python3; then |
258 |
- local -x CFLAGS="${CFLAGS}" |
259 |
- append-cflags -fno-strict-aliasing |
260 |
- fi |
261 |
- |
262 |
- distutils-r1_python_compile |
263 |
-} |
264 |
- |
265 |
-python_test() { |
266 |
- esetup.py test |
267 |
-} |
268 |
|
269 |
diff --git a/profiles/base/package.use.mask b/profiles/base/package.use.mask |
270 |
index fc41d647b11..a626c92c479 100644 |
271 |
--- a/profiles/base/package.use.mask |
272 |
+++ b/profiles/base/package.use.mask |
273 |
@@ -128,7 +128,6 @@ dev-python/zeep tornado |
274 |
|
275 |
# Michał Górny <mgorny@g.o> (2020-01-29) |
276 |
# Require dev-python/epydoc which is being removed. |
277 |
-<=dev-python/pycrypto-2.6.1-r2 doc |
278 |
<=dev-python/restkit-4.2.2 doc |
279 |
<=dev-python/suds-0.6-r1 doc |
280 |
|
281 |
|
282 |
diff --git a/profiles/package.mask b/profiles/package.mask |
283 |
index 2027819d571..6c1309330d2 100644 |
284 |
--- a/profiles/package.mask |
285 |
+++ b/profiles/package.mask |
286 |
@@ -649,12 +649,6 @@ games-util/pogo-manager-bin |
287 |
net-p2p/bisq |
288 |
sci-mathematics/geogebra |
289 |
|
290 |
-# Michał Górny <mgorny@g.o> (2020-04-18) |
291 |
-# Long dead, vulnerable. All revdeps have either been ported away, |
292 |
-# removed or had their optional deps removed. |
293 |
-# Removal in 30 days. Bug #703682. |
294 |
-dev-python/pycrypto |
295 |
- |
296 |
# Matt Turner <mattst88@g.o> (2020-04-12) |
297 |
# In conjunction with Firefox's sandbox, breaks loading of i965 driver. |
298 |
# Bug #716574 |