STINNER Victor <[email protected]> added the comment:
In Python 3.9, test_pha_required_nocert() looks more strict, it requires read()
to fail with the 'tlsv13 alert certificate required' error message:
# receive alert
with self.assertRaisesRegex(
ssl.SSLError,
'tlsv13 alert certificate required'):
s.recv(1024)
In the main branch, it tolerates "EOF occurred" error:
# test sometimes fails with EOF error. Test passes as long as
# server aborts connection with an error.
with self.assertRaisesRegex(
ssl.SSLError,
'(certificate required|EOF occurred)'
):
# receive CertificateRequest
data = s.recv(1024)
self.assertEqual(data, b'OK\n')
# send empty Certificate + Finish
s.write(b'HASCERT')
# receive alert
s.recv(1024)
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43921>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com