Skip to content

Commit ce9a064

Browse files
authored
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
1 parent a460ab3 commit ce9a064

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
@@ -4424,9 +4424,11 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
44244424
server_hostname=hostname) as s:
44254425
s.connect((HOST, server.port))
44264426
s.write(b'PHA')
4427+
# test sometimes fails with EOF error. Test passes as long as
4428+
# server aborts connection with an error.
44274429
with self.assertRaisesRegex(
44284430
ssl.SSLError,
4429-
'tlsv13 alert certificate required'
4431+
'(certificate required|EOF occurred)'
44304432
):
44314433
# receive CertificateRequest
44324434
self.assertEqual(s.recv(1024), b'OK\n')

0 commit comments

Comments
 (0)