bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)

This commit is contained in:
Christian Heimes 2021-12-17 17:17:32 +02:00 committed by GitHub
parent efd6236d36
commit 2985feac4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 3 deletions

View file

@ -220,7 +220,7 @@ jobs:
strategy:
fail-fast: false
matrix:
openssl_ver: [1.1.1l, 3.0.0]
openssl_ver: [1.1.1l, 3.0.1]
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
MULTISSL_DIR: ${{ github.workspace }}/multissl

View file

@ -540,7 +540,11 @@ class BasicSocketTests(unittest.TestCase):
self.assertLessEqual(status, 15)
libressl_ver = f"LibreSSL {major:d}"
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}"
if major >= 3:
# 3.x uses 0xMNN00PP0L
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{patch:d}"
else:
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}"
self.assertTrue(
s.startswith((openssl_ver, libressl_ver)),
(s, t, hex(n))

View file

@ -0,0 +1 @@
Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses ``0xMNN00PP0L``.

View file

@ -48,7 +48,7 @@ OPENSSL_OLD_VERSIONS = [
OPENSSL_RECENT_VERSIONS = [
"1.1.1l",
"3.0.0"
"3.0.1"
]
LIBRESSL_OLD_VERSIONS = [