File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -185,7 +185,8 @@ def _do_tls_handshake(self):
185185 elif err .args [0 ] == ssl .SSL_ERROR_EOF :
186186 return self .handle_close ()
187187 # TODO: SSLError does not expose alert information
188- elif ("SSLV3_ALERT_BAD_CERTIFICATE" in err .args [1 ] or
188+ elif ("TLS_ALERT_BAD_CERTIFICATE" in err .args [1 ] or
189+ "SSLV3_ALERT_BAD_CERTIFICATE" in err .args [1 ] or
189190 "SSLV3_ALERT_CERTIFICATE_UNKNOWN" in err .args [1 ]):
190191 return self .handle_close ()
191192 raise
@@ -423,6 +424,7 @@ def test_stls_context(self):
423424 self .assertEqual (ctx .check_hostname , True )
424425 with self .assertRaises (ssl .CertificateError ):
425426 resp = self .client .stls (context = ctx )
427+
426428 self .client = poplib .POP3 ("localhost" , self .server .port ,
427429 timeout = test_support .LOOPBACK_TIMEOUT )
428430 resp = self .client .stls (context = ctx )
You can’t perform that action at this time.
0 commit comments