summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-10-04 13:09:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-10-08 14:13:54 +0100
commit2b4dce4925627c81ee2f27a0eeb2422e15029c3e (patch)
tree48e0333d2e1a1f5f5de14c3a0972de326c82418e /meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
parent4b8fd52f6d3682be287cc63d73bd06cb751751f4 (diff)
downloadpoky-2b4dce4925627c81ee2f27a0eeb2422e15029c3e.tar.gz
python: fix failing ssl tests
Backport two and pick some other in-review patches from Ubuntu to fix ssl test failures because of OpenSSL 1.1.x changes. Fixes [YOCTO #12788] (From OE-Core rev: 4f4bbb936231dd30c3745ef573993f1062937ffd) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch')
-rw-r--r--meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch b/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
new file mode 100644
index 0000000000..77016cb430
--- /dev/null
+++ b/meta/recipes-devtools/python/python/0003-bpo-34834-Fix-test_ssl.test_options-to-account-for-O.patch
@@ -0,0 +1,37 @@
1From 8b06d56d26eee289fec22b9b72ab4c7cc3d6c482 Mon Sep 17 00:00:00 2001
2From: Dimitri John Ledkov <xnox@ubuntu.com>
3Date: Fri, 28 Sep 2018 16:34:16 +0100
4Subject: [PATCH 3/4] bpo-34834: Fix test_ssl.test_options to account for
5 OP_ENABLE_MIDDLEBOX_COMPAT.
6
7Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>
8
9https://bugs.python.org/issue34834
10
11Patch taken from Ubuntu.
12Upstream-Status: Submitted [https://github.com/python/cpython/pull/9624]
13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 Lib/test/test_ssl.py | 5 +++++
17 1 file changed, 5 insertions(+)
18
19diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
20index 7a14053cee..efc906a5ba 100644
21--- a/Lib/test/test_ssl.py
22+++ b/Lib/test/test_ssl.py
23@@ -777,6 +777,11 @@ class ContextTests(unittest.TestCase):
24 default = (ssl.OP_ALL | ssl.OP_NO_SSLv2 | ssl.OP_NO_SSLv3)
25 if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0):
26 default |= ssl.OP_NO_COMPRESSION
27+ if not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1):
28+ # define MIDDLEBOX constant, as python2.7 does not know about it
29+ # but it is used by default.
30+ OP_ENABLE_MIDDLEBOX_COMPAT = 1048576L
31+ default |= OP_ENABLE_MIDDLEBOX_COMPAT
32 self.assertEqual(default, ctx.options)
33 ctx.options |= ssl.OP_NO_TLSv1
34 self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
35--
362.17.1
37