mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
fix for release blocker 3910, 2.6 regression in socket.ssl method
This commit is contained in:
parent
9350234683
commit
eb257ac97d
2 changed files with 28 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue