Skip to content

Commit a7d7f30

Browse files
committed
bpo-43921: also accept EOF in post-handshake auth test
1 parent 8b230b9 commit a7d7f30

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4504,9 +4504,11 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
45044504
server_hostname=hostname) as s:
45054505
s.connect((HOST, server.port))
45064506
s.write(b'PHA')
4507+
# test sometimes fails with EOF error. Test passes as long as
4508+
# server aborts connection with an error.
45074509
with self.assertRaisesRegex(
45084510
ssl.SSLError,
4509-
'tlsv13 alert certificate required'
4511+
'(certificate required|EOF occurred)'
45104512
):
45114513
# receive CertificateRequest
45124514
self.assertEqual(s.recv(1024), b'OK\n')

0 commit comments

Comments
 (0)