Commit 799cb481 authored by rsleevi@chromium.org's avatar rsleevi@chromium.org

Update tlslite README.chromium and add a patch for r53724

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/3115011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56977 0039d316-1c4b-4281-b951-d872f2087c98
parent 00feb467
Name: tlslite
URL: http://trevp.net/tlslite/
tlslite/TLSRecordLayer.py was changed to force the socket to be closed when the
SSL connection is closed. This is is necessary at this point since WinHTTP does
not seem to react to the SSL close notify. It's also needed to prevent a hang
on Linux. See also
http://sourceforge.net/mailarchive/forum.php?thread_name=41C9B18B.2010201%40ag.com&forum_name=tlslite-users
The change is in chromium.patch.
Local Modifications:
- patches/close_notify.patch: tlslite/TLSRecordLayer.py was changed to force
the socket to be closed when the SSL connection is closed. This is is
necessary at this point since WinHTTP does not seem to react to the SSL
close notify. It's also needed to prevent a hang on Linux. See also
http://sourceforge.net/mailarchive/forum.php?thread_name=41C9B18B.2010201%40ag.com&forum_name=tlslite-users
- patches/python26.patch: Replace sha, md5 module imports with hashlib, as
they are deprecated in Python 2.6
diff -aur tlslite-0.3.8/tlslite/TLSRecordLayer.py chromium/tlslite/TLSRecordLayer.py
--- tlslite-0.3.8/tlslite/TLSRecordLayer.py 2005-02-22 00:31:41.000000000 -0500
+++ chromium/tlslite/TLSRecordLayer.py 2010-08-14 16:54:14.506283500 -0400
@@ -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
diff -aur tlslite-0.3.8/tlslite/mathtls.py chromium/tlslite/mathtls.py
--- tlslite-0.3.8/tlslite/mathtls.py 2004-10-06 01:01:15.000000000 -0400
+++ chromium/tlslite/mathtls.py 2010-08-14 16:54:14.526283600 -0400
@@ -4,8 +4,18 @@
from utils.cryptomath import *
import hmac
-import md5
-import sha
+
+# 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
#1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups]
goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D8E250B98BE48E495C1D6089DAD15DC7D7B46154D6B6CE8EF4AD69B15D4982559B297BCF1885C529F566660E57EC68EDBC3C05726CC02FD4CBF4976EAA9AFD5138FE8376435B9FC61D2FC0EB06E3),\
diff -aur tlslite-0.3.8/tlslite/messages.py chromium/tlslite/messages.py
--- tlslite-0.3.8/tlslite/messages.py 2004-10-06 01:01:24.000000000 -0400
+++ chromium/tlslite/messages.py 2010-08-14 16:54:14.536283600 -0400
@@ -8,8 +8,17 @@
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):
diff -aur tlslite-0.3.8/tlslite/utils/cryptomath.py chromium/tlslite/utils/cryptomath.py
--- tlslite-0.3.8/tlslite/utils/cryptomath.py 2004-10-06 01:02:53.000000000 -0400
+++ chromium/tlslite/utils/cryptomath.py 2010-08-14 16:54:14.556283600 -0400
@@ -6,7 +6,18 @@
import math
import base64
import binascii
-import sha
+
+# 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
from compat import *
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment