Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: third_party/tlslite/tlslite/messages.py

Issue 2881026: Replaced sha, md5 module imports with hashlib (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tlslite/tlslite/mathtls.py ('k') | third_party/tlslite/tlslite/utils/cryptomath.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/messages.py
===================================================================
--- third_party/tlslite/tlslite/messages.py (revision 53598)
+++ third_party/tlslite/tlslite/messages.py (working copy)
@@ -8,9 +8,18 @@
from X509 import X509
from X509CertChain import X509CertChain
-import sha
-import md5
+# The sha module is deprecated in Python 2.6
+try:
+ import sha
+except ImportError:
+ from hashlib import sha1 as sha
+# The md5 module is deprecated in Python 2.6
+try:
+ import md5
+except ImportError:
+ from hashlib import md5
+
class RecordHeader3:
def __init__(self):
self.type = 0
« no previous file with comments | « third_party/tlslite/tlslite/mathtls.py ('k') | third_party/tlslite/tlslite/utils/cryptomath.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698