Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2985fea

Browse files
authored
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
1 parent efd6236 commit 2985fea

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
strategy:
221221
fail-fast: false
222222
matrix:
223-
openssl_ver: [1.1.1l, 3.0.0]
223+
openssl_ver: [1.1.1l, 3.0.1]
224224
env:
225225
OPENSSL_VER: ${{ matrix.openssl_ver }}
226226
MULTISSL_DIR: ${{ github.workspace }}/multissl

Lib/test/test_ssl.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,11 @@ def test_openssl_version(self):
540540
self.assertLessEqual(status, 15)
541541

542542
libressl_ver = f"LibreSSL {major:d}"
543-
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}"
543+
if major >= 3:
544+
# 3.x uses 0xMNN00PP0L
545+
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{patch:d}"
546+
else:
547+
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}"
544548
self.assertTrue(
545549
s.startswith((openssl_ver, libressl_ver)),
546550
(s, t, hex(n))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses ``0xMNN00PP0L``.

Tools/ssl/multissltests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
OPENSSL_RECENT_VERSIONS = [
5050
"1.1.1l",
51-
"3.0.0"
51+
"3.0.1"
5252
]
5353

5454
LIBRESSL_OLD_VERSIONS = [

0 commit comments

Comments
 (0)