1 |
commit: ed217e133fe9313a47ef34da94239693ce72440c |
2 |
Author: Stefan Strogin <steils <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 2 12:23:52 2020 +0000 |
4 |
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Dec 2 12:25:42 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed217e13 |
7 |
|
8 |
dev-python/pyopenssl: add patch for LibreSSL |
9 |
|
10 |
Closes: https://bugs.gentoo.org/757738 |
11 |
Package-Manager: Portage-3.0.11, Repoman-3.0.2 |
12 |
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org> |
13 |
|
14 |
.../files/pyopenssl-20.0.0-libressl.patch | 30 ++++++++++++++++++++++ |
15 |
...sl-20.0.0.ebuild => pyopenssl-20.0.0-r1.ebuild} | 2 ++ |
16 |
2 files changed, 32 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch b/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..6e9c7847fce |
21 |
--- /dev/null |
22 |
+++ b/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch |
23 |
@@ -0,0 +1,30 @@ |
24 |
+From ecbd275386e5608f0f90d3536506d7f50026ffe6 Mon Sep 17 00:00:00 2001 |
25 |
+From: "Nathaniel J. Smith" <njs@×××××.com> |
26 |
+Date: Thu, 1 Aug 2019 21:23:51 -0700 |
27 |
+Subject: [PATCH] Support openssl <1.1.1 |
28 |
+ |
29 |
+Upstream-Status: Inappropriate |
30 |
+[https://github.com/pyca/pyopenssl/pull/861/commits/ecbd275386e5608f0f90d3536506d7f50026ffe6 |
31 |
+was accepted in 19.1.0 but later removed since the upstream dropped |
32 |
+support of OpenSSL <1.1.1] |
33 |
+Signed-off-by: Stefan Strogin <steils@g.o> |
34 |
+--- |
35 |
+ src/OpenSSL/SSL.py | 5 ++++- |
36 |
+ 1 file changed, 4 insertions(+), 1 deletion(-) |
37 |
+ |
38 |
+diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py |
39 |
+index 6f785fc4..55211511 100644 |
40 |
+--- a/src/OpenSSL/SSL.py |
41 |
++++ b/src/OpenSSL/SSL.py |
42 |
+@@ -140,7 +140,10 @@ class _buffer(object): |
43 |
+ OP_NO_TLSv1 = _lib.SSL_OP_NO_TLSv1 |
44 |
+ OP_NO_TLSv1_1 = _lib.SSL_OP_NO_TLSv1_1 |
45 |
+ OP_NO_TLSv1_2 = _lib.SSL_OP_NO_TLSv1_2 |
46 |
+-OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3 |
47 |
++try: |
48 |
++ OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3 |
49 |
++except AttributeError: |
50 |
++ pass |
51 |
+ |
52 |
+ MODE_RELEASE_BUFFERS = _lib.SSL_MODE_RELEASE_BUFFERS |
53 |
+ |
54 |
|
55 |
diff --git a/dev-python/pyopenssl/pyopenssl-20.0.0.ebuild b/dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild |
56 |
similarity index 96% |
57 |
rename from dev-python/pyopenssl/pyopenssl-20.0.0.ebuild |
58 |
rename to dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild |
59 |
index b09f1b1bdec..0e4a096a48a 100644 |
60 |
--- a/dev-python/pyopenssl/pyopenssl-20.0.0.ebuild |
61 |
+++ b/dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild |
62 |
@@ -37,6 +37,8 @@ DEPEND="${RDEPEND} |
63 |
>=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] |
64 |
)" |
65 |
|
66 |
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch ) |
67 |
+ |
68 |
distutils_enable_sphinx doc \ |
69 |
dev-python/sphinx_rtd_theme |