ports/devel/py-gdata/files/patch-src_gdata_tlslite-messages.py
Ruslan Makhmatkhanov 96cca9ec1d - update to 2.0.18
- apply all the patches unconditionally (we have no pythons less than 2.6)
- avoid PYTHON_SITELIBDIR usage
- tab -> space change in pkg-descr:WWW

PR:		179609
Submitted by:	rm (myself)
Approved by:	olivierd (maintainer)
2013-06-16 16:26:51 +00:00

22 lines
698 B
Python

--- src/gdata/tlslite/messages.py.orig 2008-12-02 03:35:34.000000000 +0100
+++ src/gdata/tlslite/messages.py 2009-11-03 21:48:12.189964805 +0100
@@ -8,8 +8,7 @@
from X509 import X509
from X509CertChain import X509CertChain
-import sha
-import md5
+import hashlib
class RecordHeader3:
def __init__(self):
@@ -405,7 +404,8 @@
try:
bytes = clientRandom + serverRandom + self.write()[4:]
s = bytesToString(bytes)
- return stringToBytes(md5.md5(s).digest() + sha.sha(s).digest())
+ return stringToBytes(hashlib.md5(s).digest() \
+ + hashlib.sha1(s).digest())
finally:
self.cipherSuite = oldCipherSuite