https://github.com/python/cpython/commit/fc9602819181d68568259029a2accfd2dfcd086d
commit: fc9602819181d68568259029a2accfd2dfcd086d
branch: main
author: Victor Stinner <[email protected]>
committer: hugovk <[email protected]>
date: 2026-05-04T16:21:04+03:00
summary:

gh-148600: Add OpenSSL 4.0.0 support to test configurations (#149356)

Co-authored-by: Charlie Lin <[email protected]>

files:
A Misc/NEWS.d/next/Tests/2026-04-21-12-33-14.gh-issue-148600.vnTb3t.rst
M .github/workflows/build.yml
M Lib/test/test_poplib.py
M Tools/ssl/multissltests.py

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d4397fc7de54a4..1af3a0607f9ad2 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -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:
diff --git a/Lib/test/test_poplib.py b/Lib/test/test_poplib.py
index 18ca7cb556836e..f08b945c8f57e5 100644
--- a/Lib/test/test_poplib.py
+++ b/Lib/test/test_poplib.py
@@ -185,7 +185,8 @@ def _do_tls_handshake(self):
                 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 @@ def test_stls_context(self):
         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
index 00000000000000..a7d4c0cc80a146
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2026-04-21-12-33-14.gh-issue-148600.vnTb3t.rst
@@ -0,0 +1 @@
+Add OpenSSL 4.0.0 support to test configurations.
diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py
index 6be1a5ae94ebc6..ad3e4b6596ed7a 100755
--- a/Tools/ssl/multissltests.py
+++ b/Tools/ssl/multissltests.py
@@ -54,6 +54,7 @@
     "3.4.5",
     "3.5.6",
     "3.6.2",
+    "4.0.0",
     # See make_ssl_data.py for notes on adding a new version.
 ]
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to