From f7ff1fe014129a4ade143d12c98f48fbbe543bc5 Mon Sep 17 00:00:00 2001 From: Stewart Adam Date: Sat, 7 Feb 2009 14:25:07 +0000 Subject: [PATCH] - Add patch to hashlib instead of deprecated md5 and sha modules (#484473) --- pycrypto-2.0.1-hashlib.patch | 33 +++++++++++++++++++++++++++++++++ python-crypto.spec | 6 +++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 pycrypto-2.0.1-hashlib.patch diff --git a/pycrypto-2.0.1-hashlib.patch b/pycrypto-2.0.1-hashlib.patch new file mode 100644 index 0000000..5de9741 --- /dev/null +++ b/pycrypto-2.0.1-hashlib.patch @@ -0,0 +1,33 @@ +--- HMAC.py.old 2009-02-07 09:08:31.000000000 -0500 ++++ HMAC.py 2009-02-07 09:09:08.000000000 -0500 +@@ -33,7 +33,7 @@ + digestmod: A module supporting PEP 247. Defaults to the md5 module. + """ + if digestmod == None: +- import md5 ++ from hashlib import md5 + digestmod = md5 + + self.digestmod = digestmod +--- MD5.py.old 2009-02-07 09:08:22.000000000 -0500 ++++ MD5.py 2009-02-07 09:09:22.000000000 -0500 +@@ -3,7 +3,7 @@ + + __revision__ = "$Id: MD5.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $" + +-from md5 import * ++from hashlib import md5 + + import md5 + if hasattr(md5, 'digestsize'): +--- SHA.py.old 2009-02-07 09:08:38.000000000 -0500 ++++ SHA.py 2009-02-07 09:09:32.000000000 -0500 +@@ -3,7 +3,7 @@ + + __revision__ = "$Id: SHA.py,v 1.4 2002/07/11 14:31:19 akuchling Exp $" + +-from sha import * ++from hashlib import sha + import sha + if hasattr(sha, 'digestsize'): + digest_size = digestsize diff --git a/python-crypto.spec b/python-crypto.spec index 9254de4..b49bc39 100644 --- a/python-crypto.spec +++ b/python-crypto.spec @@ -4,9 +4,10 @@ Summary: Cryptography library for Python Name: python-crypto Version: 2.0.1 -Release: 14.1 +Release: 15 License: Public Domain Group: Development/Libraries +# FIXME: In the near future, new releases will be at http://www.dlitz.net/software/pycrypto/ URL: http://www.amk.ca/python/code/crypto.html Source: http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz Provides: pycrypto = %{version}-%{release} @@ -62,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Sat Feb 7 2009 Stewart Adam - 2.0.1-15 +- Add patch to hashlib instead of deprecated md5 and sha modules (#484473) + * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 2.0.1-14.1 - Rebuild for Python 2.6