Skip to content

Commit 5d1fb45

Browse files
committed
bpo-43921: also accept EOF in post-handshake auth test
1 parent e08a8bb commit 5d1fb45

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
@@ -4510,9 +4510,11 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
45104510
server_hostname=hostname) as s:
45114511
s.connect((HOST, server.port))
45124512
s.write(b'PHA')
4513+
# test sometimes fails with EOF error. Test passes as long as
4514+
# server aborts connection with an error.
45134515
with self.assertRaisesRegex(
45144516
ssl.SSLError,
4515-
'tlsv13 alert certificate required'
4517+
'(certificate required|EOF occurred)'
45164518
):
45174519
# receive CertificateRequest
45184520
self.assertEqual(s.recv(1024), b'OK\n')

0 commit comments

Comments
 (0)