]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
authorChristian Heimes <christian@python.org>
Sat, 24 Apr 2021 13:08:13 +0000 (15:08 +0200)
committerGitHub <noreply@github.com>
Sat, 24 Apr 2021 13:08:13 +0000 (15:08 +0200)
Lib/test/test_ssl.py

index 71260bd9827db406b74827ee64399166b930e47d..15d7bfaeec9e0d409150c3e58dec3ec0e8699fc9 100644 (file)
@@ -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')