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

Unified Diff: third_party/tlslite/tlslite/TLSRecordLayer.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 | « no previous file | third_party/tlslite/tlslite/mathtls.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tlslite/tlslite/TLSRecordLayer.py
===================================================================
--- third_party/tlslite/tlslite/TLSRecordLayer.py (revision 53598)
+++ third_party/tlslite/tlslite/TLSRecordLayer.py (working copy)
@@ -12,8 +12,19 @@
from utils.cryptomath import getRandomBytes
from utils import hmac
from FileObject import FileObject
-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
+
import socket
import errno
import traceback
« no previous file with comments | « no previous file | third_party/tlslite/tlslite/mathtls.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698