diff options
author | Ross Burton <ross@burtonini.com> | 2021-12-20 15:23:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-21 12:01:41 +0000 |
commit | 679cb095f2ec9f90b629521eb9b34ea04f0dc132 (patch) | |
tree | a22b2cb9a9e0c5f3e163cb1642e16732b06c803b /meta/recipes-devtools/python/python3 | |
parent | 2969d72edba050c65172dbea61eac9bf34c8c239 (diff) | |
download | poky-679cb095f2ec9f90b629521eb9b34ea04f0dc132.tar.gz |
python3: backport a fix so the test suite passes with OpenSSL 3.0.1
The test suite makes incorrect assumptions about OpenSSL versions post-
3.0, so backport the fix for the test suite.
(From OE-Core rev: 2b5e9cfd2c1914d606725029c59cd50cca3d5511)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r-- | meta/recipes-devtools/python/python3/0001-bpo-46114-Fix-OpenSSL-version-check-for-3.0.1-GH-301.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-bpo-46114-Fix-OpenSSL-version-check-for-3.0.1-GH-301.patch b/meta/recipes-devtools/python/python3/0001-bpo-46114-Fix-OpenSSL-version-check-for-3.0.1-GH-301.patch new file mode 100644 index 0000000000..6f4ceae188 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-bpo-46114-Fix-OpenSSL-version-check-for-3.0.1-GH-301.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From 251d2eadc7f5b4042245709f41c38169a284e146 Mon Sep 17 00:00:00 2001 | ||
5 | From: "Miss Islington (bot)" | ||
6 | <31488909+miss-islington@users.noreply.github.com> | ||
7 | Date: Fri, 17 Dec 2021 07:38:11 -0800 | ||
8 | Subject: [PATCH] bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170) | ||
9 | |||
10 | (cherry picked from commit 2985feac4e02d590bb78bcce9e30864be53280ac) | ||
11 | |||
12 | Co-authored-by: Christian Heimes <christian@python.org> | ||
13 | --- | ||
14 | .github/workflows/build.yml | 2 +- | ||
15 | Lib/test/test_ssl.py | 6 +++++- | ||
16 | .../next/Tests/2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst | 1 + | ||
17 | Tools/ssl/multissltests.py | 2 +- | ||
18 | 4 files changed, 8 insertions(+), 3 deletions(-) | ||
19 | create mode 100644 Misc/NEWS.d/next/Tests/2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst | ||
20 | |||
21 | diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py | ||
22 | index a485f7d4c3..873db6403d 100644 | ||
23 | --- a/Lib/test/test_ssl.py | ||
24 | +++ b/Lib/test/test_ssl.py | ||
25 | @@ -539,7 +539,11 @@ def test_openssl_version(self): | ||
26 | self.assertLessEqual(status, 15) | ||
27 | |||
28 | libressl_ver = f"LibreSSL {major:d}" | ||
29 | - openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}" | ||
30 | + if major >= 3: | ||
31 | + # 3.x uses 0xMNN00PP0L | ||
32 | + openssl_ver = f"OpenSSL {major:d}.{minor:d}.{patch:d}" | ||
33 | + else: | ||
34 | + openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}" | ||
35 | self.assertTrue( | ||
36 | s.startswith((openssl_ver, libressl_ver)), | ||
37 | (s, t, hex(n)) | ||
38 | diff --git a/Misc/NEWS.d/next/Tests/2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst b/Misc/NEWS.d/next/Tests/2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst | ||
39 | new file mode 100644 | ||
40 | index 0000000000..6878cea032 | ||
41 | --- /dev/null | ||
42 | +++ b/Misc/NEWS.d/next/Tests/2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst | ||
43 | @@ -0,0 +1 @@ | ||
44 | +Fix test case for OpenSSL 3.0.1 version. OpenSSL 3.0 uses ``0xMNN00PP0L``. | ||
45 | diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py | ||
46 | index ba2663e9a3..8fe5b5d0c2 100755 | ||
47 | --- a/Tools/ssl/multissltests.py | ||
48 | +++ b/Tools/ssl/multissltests.py | ||
49 | @@ -48,7 +48,7 @@ | ||
50 | |||
51 | OPENSSL_RECENT_VERSIONS = [ | ||
52 | "1.1.1l", | ||
53 | - "3.0.0" | ||
54 | + "3.0.1" | ||
55 | ] | ||
56 | |||
57 | LIBRESSL_OLD_VERSIONS = [ | ||
58 | -- | ||
59 | 2.25.1 | ||
60 | |||