From b6eef2af19ce3ac46e1aa369cf4b0e0c3d839df7 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 27 Jul 2020 05:40:30 +0800 Subject: [PATCH] python-cryptography: Update to 3.0 Also: * Remove patches that are included in the update * Replace the python3 dependency with a smaller list (python3-urllib is needed because it is a dependency of python3-email) Signed-off-by: Jeffery To --- lang/python/python-cryptography/Makefile | 11 +++-- .../patches/010-remove-npn.patch | 41 ------------------- .../patches/020-disable-npn.patch | 23 ----------- .../patches/030-remove-npn.patch | 22 ---------- 4 files changed, 7 insertions(+), 90 deletions(-) delete mode 100644 lang/python/python-cryptography/patches/010-remove-npn.patch delete mode 100644 lang/python/python-cryptography/patches/020-disable-npn.patch delete mode 100644 lang/python/python-cryptography/patches/030-remove-npn.patch diff --git a/lang/python/python-cryptography/Makefile b/lang/python/python-cryptography/Makefile index e5a9a1e03..5693d5734 100644 --- a/lang/python/python-cryptography/Makefile +++ b/lang/python/python-cryptography/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-cryptography -PKG_VERSION:=2.9.2 -PKG_RELEASE:=2 +PKG_VERSION:=3.0 +PKG_RELEASE:=1 PYPI_NAME:=cryptography -PKG_HASH:=a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229 +PKG_HASH:=8e924dbc025206e97756e8903039662aa58aa9ba357d8e1d8fc29e3092322053 PKG_LICENSE:=Apache-2.0 BSD-3-Clause PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD @@ -35,7 +35,10 @@ define Package/python3-cryptography URL:=https://github.com/pyca/cryptography DEPENDS:= \ +libopenssl \ - +python3 \ + +python3-light \ + +python3-email \ + +python3-openssl \ + +python3-urllib \ +python3-cffi \ +python3-six endef diff --git a/lang/python/python-cryptography/patches/010-remove-npn.patch b/lang/python/python-cryptography/patches/010-remove-npn.patch deleted file mode 100644 index 00104b23c..000000000 --- a/lang/python/python-cryptography/patches/010-remove-npn.patch +++ /dev/null @@ -1,41 +0,0 @@ -From eec1f066476eccf7135af0a4cfef9e1c883795b3 Mon Sep 17 00:00:00 2001 -From: Paul Kehrer -Date: Mon, 25 Feb 2019 10:55:16 +0800 -Subject: [PATCH] remove NPN bindings -- you should be using ALPN! - -pyOpenSSL consumed these, but we've marked it as deprecated and it -already handles the case where the bindings are not available. ---- - src/_cffi_src/openssl/ssl.py | 16 ---------------- - 1 file changed, 16 deletions(-) - -diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py -index da21f3ce90..0e8610f988 100644 ---- a/src/_cffi_src/openssl/ssl.py -+++ b/src/_cffi_src/openssl/ssl.py -@@ -431,25 +431,9 @@ - - long SSL_session_reused(SSL *); - --void SSL_CTX_set_next_protos_advertised_cb(SSL_CTX *, -- int (*)(SSL *, -- const unsigned char **, -- unsigned int *, -- void *), -- void *); --void SSL_CTX_set_next_proto_select_cb(SSL_CTX *, -- int (*)(SSL *, -- unsigned char **, -- unsigned char *, -- const unsigned char *, -- unsigned int, -- void *), -- void *); - int SSL_select_next_proto(unsigned char **, unsigned char *, - const unsigned char *, unsigned int, - const unsigned char *, unsigned int); --void SSL_get0_next_proto_negotiated(const SSL *, -- const unsigned char **, unsigned *); - - int sk_SSL_CIPHER_num(Cryptography_STACK_OF_SSL_CIPHER *); - const SSL_CIPHER *sk_SSL_CIPHER_value(Cryptography_STACK_OF_SSL_CIPHER *, int); diff --git a/lang/python/python-cryptography/patches/020-disable-npn.patch b/lang/python/python-cryptography/patches/020-disable-npn.patch deleted file mode 100644 index 1e12922e2..000000000 --- a/lang/python/python-cryptography/patches/020-disable-npn.patch +++ /dev/null @@ -1,23 +0,0 @@ -From d7293d64d503fcbde442d69a3e11c55bf6f1374a Mon Sep 17 00:00:00 2001 -From: Paul Kehrer -Date: Mon, 25 Feb 2019 11:05:46 +0800 -Subject: [PATCH] set Cryptography_HAS_NEXTPROTONEG to 0 for pyOpenSSL - -we can remove this symbol in like...5 years. ---- - src/_cffi_src/openssl/ssl.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py -index 0e8610f988..e3a7790ee1 100644 ---- a/src/_cffi_src/openssl/ssl.py -+++ b/src/_cffi_src/openssl/ssl.py -@@ -623,7 +623,7 @@ - static const long Cryptography_HAS_SSL_OP_MSIE_SSLV2_RSA_PADDING = 1; - static const long Cryptography_HAS_SSL_OP_NO_TICKET = 1; - static const long Cryptography_HAS_SSL_SET_SSL_CTX = 1; --static const long Cryptography_HAS_NEXTPROTONEG = 1; -+static const long Cryptography_HAS_NEXTPROTONEG = 0; - - /* SSL_get0_param was added in OpenSSL 1.0.2. */ - #if CRYPTOGRAPHY_OPENSSL_LESS_THAN_102 && !CRYPTOGRAPHY_LIBRESSL_27_OR_GREATER diff --git a/lang/python/python-cryptography/patches/030-remove-npn.patch b/lang/python/python-cryptography/patches/030-remove-npn.patch deleted file mode 100644 index 69aeb436e..000000000 --- a/lang/python/python-cryptography/patches/030-remove-npn.patch +++ /dev/null @@ -1,22 +0,0 @@ -From b0b50b6bbbdf3abadc70b64c56e25b872721a7f3 Mon Sep 17 00:00:00 2001 -From: Paul Kehrer -Date: Mon, 25 Feb 2019 11:12:10 +0800 -Subject: [PATCH] remove another NPN related definition - ---- - src/_cffi_src/openssl/ssl.py | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py -index e3a7790ee1..f98f576838 100644 ---- a/src/_cffi_src/openssl/ssl.py -+++ b/src/_cffi_src/openssl/ssl.py -@@ -139,8 +139,6 @@ - static const long TLS_ST_BEFORE; - static const long TLS_ST_OK; - --static const long OPENSSL_NPN_NEGOTIATED; -- - typedef ... SSL_METHOD; - typedef ... SSL_CTX; -