rpms/python-gdata/devel gdata-cryptomath_sha_deprecation.diff, NONE, 1.1

Bastien Nocera hadess at fedoraproject.org
Wed Apr 29 13:16:42 UTC 2009


Author: hadess

Update of /cvs/pkgs/rpms/python-gdata/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10280

Added Files:
	gdata-cryptomath_sha_deprecation.diff 
Log Message:
Add missing patch

gdata-cryptomath_sha_deprecation.diff:

--- NEW FILE gdata-cryptomath_sha_deprecation.diff ---
diff --git a/src/gdata/tlslite/utils/cryptomath.py b/src/gdata/tlslite/utils/cryptomath.py
index 51d6dff..67fb398 100755
--- a/src/gdata/tlslite/utils/cryptomath.py
+++ b/src/gdata/tlslite/utils/cryptomath.py
@@ -6,7 +6,7 @@ import os
 import math
 import base64
 import binascii
-import sha
+import hashlib
 
 from compat import *
 
@@ -195,7 +195,7 @@ def numBytes(n):
     return int(math.ceil(bits / 8.0))
 
 def hashAndBase64(s):
-    return stringToBase64(sha.sha(s).digest())
+    return stringToBase64(hashlib.sha1(s).digest())
 
 def getBase64Nonce(numChars=22): #defaults to an 132 bit nonce
     bytes = getRandomBytes(numChars)




More information about the fedora-extras-commits mailing list