Skip to content

Commit 4974d8e

Browse files
committed
Update error message in test_poplib
1 parent a34870e commit 4974d8e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/test/test_poplib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)