diff options
author | obache <obache@pkgsrc.org> | 2011-10-30 13:30:36 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2011-10-30 13:30:36 +0000 |
commit | 131e5d67da9189818b08764add2ec5c76e1bd36c (patch) | |
tree | 2654b950b9ddccff9c2f35c094e044f7c755fa83 /security/py-crypto | |
parent | 93889bc5a003ac3e1b82c0bbd823c547c8687c52 (diff) | |
download | pkgsrc-131e5d67da9189818b08764add2ec5c76e1bd36c.tar.gz |
Update py-cryoto to 2.4.
2.4
===
* Python 3 support! (Thorsten E. Behrens, Anders Sundman)
PyCrypto now supports every version of Python from 2.1 through 3.2.
* Timing-attack countermeasures in _fastmath: When built against
libgmp version 5 or later, we use mpz_powm_sec instead of mpz_powm.
This should prevent the timing attack described by Geremy Condra at
PyCon 2011:
http://blip.tv/pycon-us-videos-2009-2010-2011/pycon-2011-through-the-side-channel-timing-and-implementation-attacks-in-python-4897955
* New hash modules (for Python >= 2.5 only): SHA224, SHA384, and
SHA512 (Frédéric Bertolus)
* Configuration using GNU autoconf. This should help fix a bunch of
build issues.
* Support using MPIR as an alternative to GMP.
* Improve the test command in setup.py, by allowing tests to be
performed on a single sub-package or module only. (Legrandin)
You can now do something like this:
python setup.py test -m Hash.SHA256 --skip-slow-tests
* Fix double-decref of "counter" when Cipher object initialisation
fails (Ryan Kelly)
* Apply patches from Debian's python-crypto 2.3-3 package (Jan
Dittberner, Sebastian Ramacher):
- fix-RSA-generate-exception.patch
- epydoc-exclude-introspect.patch
- no-usr-local.patch
* Fix launchpad bug #702835: "Import key code is not compatible with
GMP library" (Legrandin)
* More tests, better documentation, various bugfixes.
Diffstat (limited to 'security/py-crypto')
-rw-r--r-- | security/py-crypto/Makefile | 29 | ||||
-rw-r--r-- | security/py-crypto/PLIST | 38 | ||||
-rw-r--r-- | security/py-crypto/distinfo | 10 | ||||
-rw-r--r-- | security/py-crypto/patches/patch-aa | 10 | ||||
-rw-r--r-- | security/py-crypto/patches/patch-ac | 13 |
5 files changed, 51 insertions, 49 deletions
diff --git a/security/py-crypto/Makefile b/security/py-crypto/Makefile index 0fe56adb181..56bb177c095 100644 --- a/security/py-crypto/Makefile +++ b/security/py-crypto/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.21 2011/01/18 12:06:57 drochner Exp $ +# $NetBSD: Makefile,v 1.22 2011/10/30 13:30:36 obache Exp $ # -DISTNAME= pycrypto-2.3 -PKGNAME= ${PYPKGPREFIX}-crypto-2.3 +DISTNAME= pycrypto-2.4 +PKGNAME= ${DISTNAME:S/^py/${PYPKGPREFIX}-/} CATEGORIES= security python MASTER_SITES= http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/ @@ -16,18 +16,21 @@ CONFLICTS+= ${PYPKGPREFIX}-amkCrypto-[0-9]* PKG_DESTDIR_SUPPORT= user-destdir -SUBST_CLASSES+= python -SUBST_STAGE.python= post-patch -SUBST_MESSAGE.python= Fix hardcoded paths -SUBST_FILES.python= lib/Crypto/Util/RFC1751.py -SUBST_SED.python= -e 's,@@PYTHON@@,${PYTHONBIN},' +GNU_CONFIGURE= yes -SUBST_CLASSES+= libdir -SUBST_STAGE.libdir= post-patch -SUBST_MESSAGE.libdir= Fix hardcoded libraries directory paths -SUBST_FILES.libdir+= setup.py -SUBST_SED.libdir= -e 's,@@LIBDIR@@,${PREFIX}/lib,' +do-test: + ${RUN}cd ${WRKSRC};${SETENV} ${TEST_ENV} ${PYTHONBIN} ${PYSETUP} test +PLIST_VARS+= py25 py2x +.include "../../lang/python/pyversion.mk" +.if empty(PYPKGPREFIX:Mpy24) +PLIST.py25= yes +.endif +.if empty(PYPKGPREFIX:Mpy3?) +PLIST.py2x= yes +.endif + +BUILDLINK_API_DEPENDS.gmp+= gmp>=5.0 .include "../../devel/gmp/buildlink3.mk" .include "../../lang/python/distutils.mk" .include "../../security/openssl/buildlink3.mk" diff --git a/security/py-crypto/PLIST b/security/py-crypto/PLIST index 8461af47740..f18fd7ee8f7 100644 --- a/security/py-crypto/PLIST +++ b/security/py-crypto/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.6 2010/12/05 17:13:09 gls Exp $ +@comment $NetBSD: PLIST,v 1.7 2011/10/30 13:30:36 obache Exp $ ${PYSITELIB}/Crypto/Cipher/AES.so ${PYSITELIB}/Crypto/Cipher/ARC2.so ${PYSITELIB}/Crypto/Cipher/ARC4.so @@ -25,7 +25,16 @@ ${PYSITELIB}/Crypto/Hash/RIPEMD160.so ${PYSITELIB}/Crypto/Hash/SHA.py ${PYSITELIB}/Crypto/Hash/SHA.pyc ${PYSITELIB}/Crypto/Hash/SHA.pyo +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.py +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.pyc +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA224.pyo ${PYSITELIB}/Crypto/Hash/SHA256.so +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.py +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.pyc +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA384.pyo +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.py +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.pyc +${PLIST.py25}${PYSITELIB}/Crypto/Hash/SHA512.pyo ${PYSITELIB}/Crypto/Hash/__init__.py ${PYSITELIB}/Crypto/Hash/__init__.pyc ${PYSITELIB}/Crypto/Hash/__init__.pyo @@ -84,9 +93,9 @@ ${PYSITELIB}/Crypto/Random/OSRNG/__init__.pyo ${PYSITELIB}/Crypto/Random/OSRNG/fallback.py ${PYSITELIB}/Crypto/Random/OSRNG/fallback.pyc ${PYSITELIB}/Crypto/Random/OSRNG/fallback.pyo -${PYSITELIB}/Crypto/Random/OSRNG/nt.py -${PYSITELIB}/Crypto/Random/OSRNG/nt.pyc -${PYSITELIB}/Crypto/Random/OSRNG/nt.pyo +${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.py +${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.pyc +${PLIST.py2x}${PYSITELIB}/Crypto/Random/OSRNG/nt.pyo ${PYSITELIB}/Crypto/Random/OSRNG/posix.py ${PYSITELIB}/Crypto/Random/OSRNG/posix.pyc ${PYSITELIB}/Crypto/Random/OSRNG/posix.pyo @@ -156,12 +165,24 @@ ${PYSITELIB}/Crypto/SelfTest/Hash/test_RIPEMD.pyo ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.py ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.pyc ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA.pyo +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.py +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.pyc +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA224.pyo ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.py ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.pyc ${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA256.pyo +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.py +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.pyc +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA384.pyo +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.py +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.pyc +${PYSITELIB}/Crypto/SelfTest/Hash/test_SHA512.pyo ${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.py ${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.pyc ${PYSITELIB}/Crypto/SelfTest/Protocol/__init__.pyo +${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.py +${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.pyc +${PYSITELIB}/Crypto/SelfTest/Protocol/test_AllOrNothing.pyo ${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.py ${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.pyc ${PYSITELIB}/Crypto/SelfTest/Protocol/test_chaffing.pyo @@ -259,9 +280,12 @@ ${PYSITELIB}/Crypto/Util/asn1.pyo ${PYSITELIB}/Crypto/Util/number.py ${PYSITELIB}/Crypto/Util/number.pyc ${PYSITELIB}/Crypto/Util/number.pyo -${PYSITELIB}/Crypto/Util/python_compat.py -${PYSITELIB}/Crypto/Util/python_compat.pyc -${PYSITELIB}/Crypto/Util/python_compat.pyo +${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.py +${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.pyc +${PLIST.py2x}${PYSITELIB}/Crypto/Util/py21compat.pyo +${PYSITELIB}/Crypto/Util/py3compat.py +${PYSITELIB}/Crypto/Util/py3compat.pyc +${PYSITELIB}/Crypto/Util/py3compat.pyo ${PYSITELIB}/Crypto/Util/randpool.py ${PYSITELIB}/Crypto/Util/randpool.pyc ${PYSITELIB}/Crypto/Util/randpool.pyo diff --git a/security/py-crypto/distinfo b/security/py-crypto/distinfo index adfcce05dee..b15f7e98899 100644 --- a/security/py-crypto/distinfo +++ b/security/py-crypto/distinfo @@ -1,8 +1,6 @@ -$NetBSD: distinfo,v 1.5 2010/12/05 17:13:09 gls Exp $ +$NetBSD: distinfo,v 1.6 2011/10/30 13:30:36 obache Exp $ -SHA1 (pycrypto-2.3.tar.gz) = 96b33b77e729893bd0837a09a6aa7a12b5070037 -RMD160 (pycrypto-2.3.tar.gz) = 5b7b15aab3f5e33113ba197a2edd629c72595374 -Size (pycrypto-2.3.tar.gz) = 331476 bytes -SHA1 (patch-aa) = e486ada26ed3f25f0795c886bc824fecda0cc060 +SHA1 (pycrypto-2.4.tar.gz) = 5a13dd3f0f5ecebd7f579a4510f1cd53c4a4981b +RMD160 (pycrypto-2.4.tar.gz) = e5e1ae57a10d8a15b911fd7807dadb12e881e866 +Size (pycrypto-2.4.tar.gz) = 382924 bytes SHA1 (patch-ab) = 2c72b0e70fdebd2e62aff28284afd919e935de08 -SHA1 (patch-ac) = 34efe262c56619c010879e96cfb8b2ae87bd03af diff --git a/security/py-crypto/patches/patch-aa b/security/py-crypto/patches/patch-aa deleted file mode 100644 index 5c91acaa431..00000000000 --- a/security/py-crypto/patches/patch-aa +++ /dev/null @@ -1,10 +0,0 @@ -$NetBSD: patch-aa,v 1.3 2010/12/05 17:13:09 gls Exp $ - ---- lib/Crypto/Util/RFC1751.py.orig 2010-08-27 04:41:55.000000000 +0000 -+++ lib/Crypto/Util/RFC1751.py -@@ -1,4 +1,4 @@ --#!/usr/local/bin/python -+#!@@PYTHON@@ - # rfc1751.py : Converts between 128-bit strings and a human-readable - # sequence of words, as defined in RFC1751: "A Convention for - # Human-Readable 128-bit Keys", by Daniel L. McDonald. diff --git a/security/py-crypto/patches/patch-ac b/security/py-crypto/patches/patch-ac deleted file mode 100644 index 70e1091715a..00000000000 --- a/security/py-crypto/patches/patch-ac +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ac,v 1.3 2010/12/05 17:13:09 gls Exp $ - ---- setup.py.orig 2010-08-27 04:41:55.000000000 +0000 -+++ setup.py -@@ -157,7 +157,7 @@ class PCTBuildExt (build_ext): - self.compiler.include_dirs.insert(0, "src/inc-msvc/") - - # Detect libgmp and don't build _fastmath if it is missing. -- lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib'] -+ lib_dirs = self.compiler.library_dirs + ['/lib', '/usr/lib', '@@LIBDIR@@'] - if not (self.compiler.find_library_file(lib_dirs, 'gmp')): - print >>sys.stderr, "warning: GMP library not found; Not building Crypto.PublicKey._fastmath." - self.__remove_extensions(["Crypto.PublicKey._fastmath"]) |