From: Christian Heimes Date: Sat, 24 Apr 2021 13:08:13 +0000 (+0200) Subject: bpo-43921: also accept EOF in post-handshake auth test (GH-25574) X-Git-Tag: v3.10.0b1~177 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce9a0643496ba802ea97a3da20eace3a1117ea48;p=thirdparty%2FPython%2Fcpython.git bpo-43921: also accept EOF in post-handshake auth test (GH-25574) --- diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 71260bd9827d..15d7bfaeec9e 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -4424,9 +4424,11 @@ class TestPostHandshakeAuth(unittest.TestCase): 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')