]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117483: Accept "Broken pipe" as valid error message in `test_wrong_cert_tls13...
authorSam Gross <colesbury@gmail.com>
Wed, 3 Apr 2024 12:29:02 +0000 (08:29 -0400)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2024 12:29:02 +0000 (14:29 +0200)
On macOS, the closed connection can lead to a "Broken pipe" error instead of
a "Connection reset by peer" error.

Lib/test/test_ssl.py

index 794944afd66dd0fe25ec00b1af480d072d0226b3..0e50d09c8f28d6bc2c0232a27a2eb99548c108f5 100644 (file)
@@ -3169,7 +3169,9 @@ class ThreadedTests(unittest.TestCase):
             s.connect((HOST, server.port))
             with self.assertRaisesRegex(
                 OSError,
-                'alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|closed by the remote host|Connection reset by peer'
+                'alert unknown ca|EOF occurred|TLSV1_ALERT_UNKNOWN_CA|'
+                'closed by the remote host|Connection reset by peer|'
+                'Broken pipe'
             ):
                 # TLS 1.3 perform client cert exchange after handshake
                 s.write(b'data')