From a920bc52d32ad94e0abea6172810e7d12acd84ca Mon Sep 17 00:00:00 2001 From: gls Date: Sun, 5 Dec 2010 17:13:09 +0000 Subject: Update py-crypto to version 2.3 pkgsrc changes: - add a patch to fix an hardcoded interpreter path - add a patch to actually find gmp library. - add CONFLICTS with py-amkCrypto, both have files in common. upstream changes: 2.3 === * Fix NameError when attempting to use deprecated getRandomNumber() function. * _slowmath: Compute RSA u parameter when it's not given to RSA.construct. This makes _slowmath behave the same as _fastmath in this regard. * Make RSA.generate raise a more user-friendly exception message when the user tries to generate a bogus-length key. 2.2 === * Deprecated Crypto.Util.number.getRandomNumber(), which had confusing semantics. It's been replaced by getRandomNBitInteger and getRandomInteger. (Thanks: Lorenz Quack) * Better isPrime() and getPrime() implementations that do a real Rabin-Miller probabilistic primality test (not the phony test we did before with fixed bases). (Thanks: Lorenz Quack) * getStrongPrime() implementation for generating RSA primes. (Thanks: Lorenz Quack) * Support for importing and exporting RSA keys in DER and PEM format (Thanks: Legrandin) * Fix PyCrypto when floor division (python -Qnew) is enabled. * When building using gcc, use -std=c99 for compilation. This should fix building on FreeBSD and NetBSD. --- security/py-crypto/patches/patch-aa | 10 ++++++++++ security/py-crypto/patches/patch-ab | 4 ++-- security/py-crypto/patches/patch-ac | 13 +++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 security/py-crypto/patches/patch-aa create mode 100644 security/py-crypto/patches/patch-ac (limited to 'security/py-crypto/patches') diff --git a/security/py-crypto/patches/patch-aa b/security/py-crypto/patches/patch-aa new file mode 100644 index 00000000000..5c91acaa431 --- /dev/null +++ b/security/py-crypto/patches/patch-aa @@ -0,0 +1,10 @@ +$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-ab b/security/py-crypto/patches/patch-ab index 0411b007613..bf5b09dc5d6 100644 --- a/security/py-crypto/patches/patch-ab +++ b/security/py-crypto/patches/patch-ab @@ -1,9 +1,9 @@ -$NetBSD: patch-ab,v 1.3 2010/07/22 19:34:11 gdt Exp $ +$NetBSD: patch-ab,v 1.4 2010/12/05 17:13:09 gls Exp $ Something in the build fails to detect that we have wchar.h. This change make it build on NetBSD; a better fix is welcome. ---- src/libtom/tomcrypt_pk.h.orig 2009-12-13 20:39:29.000000000 +0000 +--- src/libtom/tomcrypt_pk.h.orig 2010-08-27 04:41:55.000000000 +0000 +++ src/libtom/tomcrypt_pk.h @@ -495,12 +495,7 @@ int der_length_printable_string(const un int der_printable_char_encode(int c); diff --git a/security/py-crypto/patches/patch-ac b/security/py-crypto/patches/patch-ac new file mode 100644 index 00000000000..70e1091715a --- /dev/null +++ b/security/py-crypto/patches/patch-ac @@ -0,0 +1,13 @@ +$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"]) -- cgit v1.2.3