mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
bpo-43921: also accept EOF in post-handshake auth test (GH-25574)
This commit is contained in:
parent
a460ab3134
commit
ce9a064349
1 changed files with 3 additions and 1 deletions
|
@ -4424,9 +4424,11 @@ class TestPostHandshakeAuth(unittest.TestCase):
|
||||||
server_hostname=hostname) as s:
|
server_hostname=hostname) as s:
|
||||||
s.connect((HOST, server.port))
|
s.connect((HOST, server.port))
|
||||||
s.write(b'PHA')
|
s.write(b'PHA')
|
||||||
|
# test sometimes fails with EOF error. Test passes as long as
|
||||||
|
# server aborts connection with an error.
|
||||||
with self.assertRaisesRegex(
|
with self.assertRaisesRegex(
|
||||||
ssl.SSLError,
|
ssl.SSLError,
|
||||||
'tlsv13 alert certificate required'
|
'(certificate required|EOF occurred)'
|
||||||
):
|
):
|
||||||
# receive CertificateRequest
|
# receive CertificateRequest
|
||||||
self.assertEqual(s.recv(1024), b'OK\n')
|
self.assertEqual(s.recv(1024), b'OK\n')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue