Skip to content

Commit a214f55

Browse files
authored
gh-117483: Accept "Broken pipe" as valid error message in test_wrong_cert_tls13 (GH-117484)
On macOS, the closed connection can lead to a "Broken pipe" error instead of a "Connection reset by peer" error.
1 parent 33ee5cb commit a214f55

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_ssl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3169,7 +3169,9 @@ def test_wrong_cert_tls13(self):
31693169
s.connect((HOST, server.port))
31703170
with self.assertRaisesRegex(
31713171
OSError,
3172-
'alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|closed by the remote host|Connection reset by peer'
3172+
'alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|'
3173+
'closed by the remote host|Connection reset by peer|'
3174+
'Broken pipe'
31733175
):
31743176
# TLS 1.3 perform client cert exchange after handshake
31753177
s.write(b'data')

0 commit comments

Comments
 (0)