catch socket.error errors in badCertTest

This commit is contained in:
Bill Janssen 2008-07-17 18:17:20 +00:00
parent bded4d3ba1
commit ddc5669fd9
1 changed files with 3 additions and 0 deletions

View File

@ -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!")