diff options
author | Bill Janssen <janssen@parc.com> | 2008-09-29 18:56:38 (GMT) |
---|---|---|
committer | Bill Janssen <janssen@parc.com> | 2008-09-29 18:56:38 (GMT) |
commit | eb257ac97ddcb477893a962318219af0871d4b93 (patch) | |
tree | f02a8cf664783d15a63689404545f776394fac10 /Lib/test/test_ssl.py | |
parent | 9350234683d5f5b2523911d7f585d4420e30924d (diff) | |
download | cpython-eb257ac97ddcb477893a962318219af0871d4b93.zip cpython-eb257ac97ddcb477893a962318219af0871d4b93.tar.gz cpython-eb257ac97ddcb477893a962318219af0871d4b93.tar.bz2 |
fix for release blocker 3910, 2.6 regression in socket.ssl method
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 98681f4..5cfe7f1 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -34,6 +34,21 @@ def handle_error(prefix): if test_support.verbose: sys.stdout.write(prefix + exc_format) + def testSimpleSSLwrap(self): + try: + ssl.sslwrap_simple(socket.socket(socket.AF_INET)) + except IOError, e: + if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that + pass + else: + raise + try: + ssl.sslwrap_simple(socket.socket(socket.AF_INET)._sock) + except IOError, e: + if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that + pass + else: + raise class BasicTests(unittest.TestCase): @@ -58,7 +73,6 @@ class BasicTests(unittest.TestCase): finally: s.close() - def testCrucialConstants(self): ssl.PROTOCOL_SSLv2 ssl.PROTOCOL_SSLv23 |