8000 Apply suggestions from code review · python/cpython@d9f8a0b · GitHub
[go: up one dir, main page]

Skip to content

Commit d9f8a0b

Browse files
keepworkingencukou
andcommitted
Apply suggestions from code review
- merge ssl.SSLError and OSError as OSError - append assertRaisesRegex for test_wrong_cert_tls13 ('Connection reset by peer') Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 5bf748f commit d9f8a0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_ssl.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3095,8 +3095,8 @@ def test_wrong_cert_tls13(self):
30953095
suppress_ragged_eofs=False) as s:
30963096
s.connect((HOST, server.port))
30973097
with self.assertRaisesRegex(
3098-
(ssl.SSLError, OSError),
3099-
'(alert unknown ca|EOF occurred|closed by the remote host)'
3098+
OSError,
3099+
'alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|closed by the remote host|Connection reset by peer'
31003100
):
31013101
# TLS 1.3 perform client cert exchange after handshake
31023102
s.write(b'data')
@@ -4448,7 +4448,7 @@ def msg_cb(conn, direction, version, content_type, msg_type, data):
44484448
# test sometimes fails with EOF error. Test passes as long as
44494449
# server aborts connection with an error.
44504450
with self.assertRaisesRegex(
4451-
(ssl.SSLError, OSError),
4451+
OSError,
44524452
'(certificate required|EOF occurred|closed by the remote host)'
44534453
):
44544454
# receive CertificateRequest

0 commit comments

Comments
 (0)
0