1 diff -aur tlslite-0.3.8/tlslite/TLSRecordLayer.py chromium/tlslite/TLSRecordLayer.py 2 --- tlslite-0.3.8/tlslite/TLSRecordLayer.py 2005-02-22 00:31:41.000000000 -0500 3 +++ chromium/tlslite/TLSRecordLayer.py 2010-08-14 16:54:14.506283500 -0400 4 @@ -12,8 +12,19 @@ 5 from utils.cryptomath import getRandomBytes 6 from utils import hmac 7 from FileObject import FileObject 8 -import sha 9 -import md5 10 + 11 +# The sha module is deprecated in Python 2.6 12 +try: 13 + import sha 14 +except ImportError: 15 + from hashlib import sha1 as sha 16 + 17 +# The md5 module is deprecated in Python 2.6 18 +try: 19 + import md5 20 +except ImportError: 21 + from hashlib import md5 22 + 23 import socket 24 import errno 25 import traceback 26 diff -aur tlslite-0.3.8/tlslite/mathtls.py chromium/tlslite/mathtls.py 27 --- tlslite-0.3.8/tlslite/mathtls.py 2004-10-06 01:01:15.000000000 -0400 28 +++ chromium/tlslite/mathtls.py 2010-08-14 16:54:14.526283600 -0400 29 @@ -4,8 +4,18 @@ 30 from utils.cryptomath import * 31 32 import hmac 33 -import md5 34 -import sha 35 + 36 +# The sha module is deprecated in Python 2.6 37 +try: 38 + import sha 39 +except ImportError: 40 + from hashlib import sha1 as sha 41 + 42 +# The md5 module is deprecated in Python 2.6 43 +try: 44 + import md5 45 +except ImportError: 46 + from hashlib import md5 47 48 #1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups] 49 goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B297BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9AFD5138FE8376435B9FC61D2FC0EB06E3),\ 50 diff -aur tlslite-0.3.8/tlslite/messages.py chromium/tlslite/messages.py 51 --- tlslite-0.3.8/tlslite/messages.py 2004-10-06 01:01:24.000000000 -0400 52 +++ chromium/tlslite/messages.py 2010-08-14 16:54:14.536283600 -0400 53 @@ -8,8 +8,17 @@ 54 from X509 import X509 55 from X509CertChain import X509CertChain 56 57 -import sha 58 -import md5 59 +# The sha module is deprecated in Python 2.6 60 +try: 61 + import sha 62 +except ImportError: 63 + from hashlib import sha1 as sha 64 + 65 +# The md5 module is deprecated in Python 2.6 66 +try: 67 + import md5 68 +except ImportError: 69 + from hashlib import md5 70 71 class RecordHeader3: 72 def __init__(self): 73 diff -aur tlslite-0.3.8/tlslite/utils/cryptomath.py chromium/tlslite/utils/cryptomath.py 74 --- tlslite-0.3.8/tlslite/utils/cryptomath.py 2004-10-06 01:02:53.000000000 -0400 75 +++ chromium/tlslite/utils/cryptomath.py 2010-08-14 16:54:14.556283600 -0400 76 @@ -6,7 +6,18 @@ 77 import math 78 import base64 79 import binascii 80 -import sha 81 + 82 +# The sha module is deprecated in Python 2.6 83 +try: 84 + import sha 85 +except ImportError: 86 + from hashlib import sha1 as sha 87 + 88 +# The md5 module is deprecated in Python 2.6 89 +try: 90 + import md5 91 +except ImportError: 92 + from hashlib import md5 93 94 from compat import * 95 96