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

Co-authored-by: Charlie Lin <tuug@gmx.us>
This commit is contained in:
Victor Stinner 2026-05-04 15:21:04 +02:00 committed by GitHub
parent 7aedd0a6c6
commit fc96028191
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 1 deletions

View 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:

View file

@ -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)

View file

@ -0,0 +1 @@
Add OpenSSL 4.0.0 support to test configurations.

View file

@ -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.
]