[Python-checkins] bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
tiran
webhook-mailer at python.org
Sat Apr 24 09:08:17 EDT 2021
https://github.com/python/cpython/commit/ce9a0643496ba802ea97a3da20eace3a1117ea48
commit: ce9a0643496ba802ea97a3da20eace3a1117ea48
branch: master
author: Christian Heimes <christian at python.org>
committer: tiran <christian at python.org>
date: 2021年04月24日T15:08:13+02:00
summary:
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
files:
M Lib/test/test_ssl.py
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 71260bd9827db..15d7bfaeec9e0 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -4424,9 +4424,11 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
server_hostname=hostname) as s:
s.connect((HOST, server.port))
s.write(b'PHA')
+ # test sometimes fails with EOF error. Test passes as long as
+ # server aborts connection with an error.
with self.assertRaisesRegex(
ssl.SSLError,
- 'tlsv13 alert certificate required'
+ '(certificate required|EOF occurred)'
):
# receive CertificateRequest
self.assertEqual(s.recv(1024), b'OK\n')
More information about the Python-checkins
mailing list