summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2021-04-24 13:08:13 (GMT)
committerGitHub <noreply@github.com>2021-04-24 13:08:13 (GMT)
commitce9a0643496ba802ea97a3da20eace3a1117ea48 (patch)
treeb77f6d3345bfdc4a7182aad79e81769285d7425a /Lib
parenta460ab3134cd5cf3932c2125aec012851268f0cc (diff)
downloadcpython-ce9a0643496ba802ea97a3da20eace3a1117ea48.zip
cpython-ce9a0643496ba802ea97a3da20eace3a1117ea48.tar.gz
cpython-ce9a0643496ba802ea97a3da20eace3a1117ea48.tar.bz2
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_ssl.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index 71260bd..15d7bfa 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')