]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356)
authorVictor Stinner <vstinner@python.org>
Mon, 4 May 2026 13:21:04 +0000 (15:21 +0200)
committerGitHub <noreply@github.com>
Mon, 4 May 2026 13:21:04 +0000 (16:21 +0300)
Co-authored-by: Charlie Lin <tuug@gmx.us>
.github/workflows/build.yml
Lib/test/test_poplib.py
Misc/NEWS.d/next/Tests/2026-04-21-12-33-14.gh-issue-148600.vnTb3t.rst [new file with mode: 0644]
Tools/ssl/multissltests.py

index d4397fc7de54a4246e89ba4529a008ae72349534..1af3a0607f9ad2adb1253890012cbd86e62043b8 100644 (file)
@@ -283,6 +283,7 @@ jobs:
           - { name: openssl, version: 3.4.5 }
           - { name: openssl, version: 3.5.6 }
           - { name: openssl, version: 3.6.2 }
+          - { name: openssl, version: 4.0.0 }
           ## AWS-LC
           - { name: aws-lc, version: 1.72.1 }
     env:
index 18ca7cb556836e673f5038587835c1eb995bf733..f08b945c8f57e5d07dfa4cfe41fd8c2d21b0c331 100644 (file)
@@ -185,7 +185,8 @@ class DummyPOP3Handler(asynchat.async_chat):
                 elif err.args[0] == ssl.SSL_ERROR_EOF:
                     return self.handle_close()
                 # TODO: SSLError does not expose alert information
-                elif ("SSLV3_ALERT_BAD_CERTIFICATE" in err.args[1] or
+                elif ("TLS_ALERT_BAD_CERTIFICATE" in err.args[1] or
+                      "SSLV3_ALERT_BAD_CERTIFICATE" in err.args[1] or
                       "SSLV3_ALERT_CERTIFICATE_UNKNOWN" in err.args[1]):
                     return self.handle_close()
                 raise
@@ -423,6 +424,7 @@ class TestPOP3Class(TestCase):
         self.assertEqual(ctx.check_hostname, True)
         with self.assertRaises(ssl.CertificateError):
             resp = self.client.stls(context=ctx)
+
         self.client = poplib.POP3("localhost", self.server.port,
                                   timeout=test_support.LOOPBACK_TIMEOUT)
         resp = self.client.stls(context=ctx)
diff --git a/Misc/NEWS.d/next/Tests/2026-04-21-12-33-14.gh-issue-148600.vnTb3t.rst b/Misc/NEWS.d/next/Tests/2026-04-21-12-33-14.gh-issue-148600.vnTb3t.rst
new file mode 100644 (file)
index 0000000..a7d4c0c
--- /dev/null
@@ -0,0 +1 @@
+Add OpenSSL 4.0.0 support to test configurations.
index 6be1a5ae94ebc60eb6ceb5e5765ef23ce5c39918..ad3e4b6596ed7ae5f84c97fcb60f568714b83fa6 100755 (executable)
@@ -54,6 +54,7 @@ OPENSSL_RECENT_VERSIONS = [
     "3.4.5",
     "3.5.6",
     "3.6.2",
+    "4.0.0",
     # See make_ssl_data.py for notes on adding a new version.
 ]