mirror of https://github.com/python/cpython.git
catch socket.error errors in badCertTest
This commit is contained in:
parent
bded4d3ba1
commit
ddc5669fd9
|
@ -601,6 +601,9 @@ def badCertTest (certfile):
|
|||
except ssl.SSLError as x:
|
||||
if support.verbose:
|
||||
sys.stdout.write("\nSSLError is %s\n" % x)
|
||||
except socket.error as x:
|
||||
if support.verbose:
|
||||
sys.stdout.write("\nsocket.error is %s\n" % x)
|
||||
else:
|
||||
raise support.TestFailed(
|
||||
"Use of invalid cert should have failed!")
|
||||
|
|
Loading…
Reference in New Issue