diff options
author | Vlad Glagolev | 2021-05-11 13:23:44 +0000 |
---|---|---|
committer | Vlad Glagolev | 2021-05-11 13:23:44 +0000 |
commit | b73f4b9343417a97035485e5888a8d2ad470ddbf (patch) | |
tree | f0fe456955d5abb55d3a2dca757ff9fa350a79a5 | |
parent | d8f875a5aea5dcfe37614f6680e6ddc008bf1743 (diff) |
python-cryptography: => 3.3.2
-rwxr-xr-x | python-pypi/python-cryptography/DEPENDS | 2 | ||||
-rwxr-xr-x | python-pypi/python-cryptography/DETAILS | 4 | ||||
-rw-r--r-- | python-pypi/python-cryptography/HISTORY | 6 | ||||
-rwxr-xr-x | python-pypi/python-cryptography/PRE_BUILD | 4 | ||||
-rw-r--r-- | python-pypi/python-cryptography/libressl332.patch | 143 |
5 files changed, 156 insertions, 3 deletions
diff --git a/python-pypi/python-cryptography/DEPENDS b/python-pypi/python-cryptography/DEPENDS index 046215e552..19de592a62 100755 --- a/python-pypi/python-cryptography/DEPENDS +++ b/python-pypi/python-cryptography/DEPENDS @@ -1,4 +1,4 @@ -depends python3 && +depends PYTHON && depends pycparser && depends SSL && depends SETUPTOOLS && diff --git a/python-pypi/python-cryptography/DETAILS b/python-pypi/python-cryptography/DETAILS index 2edf0b54c7..1003d0184b 100755 --- a/python-pypi/python-cryptography/DETAILS +++ b/python-pypi/python-cryptography/DETAILS @@ -1,10 +1,10 @@ SPELL=python-cryptography SPELLX=cryptography - VERSION=3.3.1 - SOURCE_HASH=sha512:62192fe0fd3bb8844ccc0056ab72a42b038db2a4ecb0928543c520b85e1de93066dab0d604acf23d37395d68172b9618f81c6022a59ec49725bc1862096d15d1 + VERSION=3.3.2 SECURITY_PATCH=1 SOURCE=$SPELLX-$VERSION.tar.gz SOURCE_URL[0]=https://pypi.io/packages/source/c/$SPELLX/$SOURCE + SOURCE_HASH=sha512:55f6ee13342b3209b1fcb310f4c4d33d22856ee785cb2347e6ad36c34e9b42f6e0d5bece8e458b09663a5b78e34c4567fe7a211b51ca71f55ccc93e3f62dc5e4 SOURCE_HINTS="no-check-certificate" SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELLX-$VERSION" LICENSE[0]=BSD diff --git a/python-pypi/python-cryptography/HISTORY b/python-pypi/python-cryptography/HISTORY index f25fe281af..e15b99c0af 100644 --- a/python-pypi/python-cryptography/HISTORY +++ b/python-pypi/python-cryptography/HISTORY @@ -1,3 +1,9 @@ +2021-05-11 Vlad Glagolev <stealth@sourcemage.org> + * DETAILS: updated spell to 3.3.2 + * DEPENDS: return back global PYTHON + * PRE_BUILD: added, to apply patch + * libressl332.patch: added, official patch to fix build with libressl + 2020-12-20 florian franzmann <bwlf@bandrate.org> * details: version 3.3.1 diff --git a/python-pypi/python-cryptography/PRE_BUILD b/python-pypi/python-cryptography/PRE_BUILD new file mode 100755 index 0000000000..80684599eb --- /dev/null +++ b/python-pypi/python-cryptography/PRE_BUILD @@ -0,0 +1,4 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && + +patch -p1 < "${SPELL_DIRECTORY}/libressl332.patch" diff --git a/python-pypi/python-cryptography/libressl332.patch b/python-pypi/python-cryptography/libressl332.patch new file mode 100644 index 0000000000..ccbc1aa279 --- /dev/null +++ b/python-pypi/python-cryptography/libressl332.patch @@ -0,0 +1,143 @@ +index e2b5a13235a..ab296343906 100644 +--- a/src/_cffi_src/openssl/cryptography.py ++++ b/src/_cffi_src/openssl/cryptography.py +@@ -32,6 +32,13 @@ + #include <Winsock2.h> + #endif + ++#if CRYPTOGRAPHY_IS_LIBRESSL ++ #define CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER \ ++ (LIBRESSL_VERSION_NUMBER >= 0x3030200f) ++#else ++#define CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER (0) ++#endif ++ + #define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \ + (OPENSSL_VERSION_NUMBER >= 0x1010006f && !CRYPTOGRAPHY_IS_LIBRESSL) + +@@ -59,6 +66,8 @@ + static const int CRYPTOGRAPHY_NEEDS_OSRANDOM_ENGINE; + + static const int CRYPTOGRAPHY_IS_LIBRESSL; ++ ++static const int CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER; + """ + + FUNCTIONS = """ +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index 11a7d63a961..23cbc5ff425 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -585,7 +585,7 @@ + static const long TLS_ST_OK = 0; + #endif + +-#if CRYPTOGRAPHY_IS_LIBRESSL ++#if CRYPTOGRAPHY_IS_LIBRESSL && !CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER + static const long SSL_OP_NO_DTLSv1 = 0; + static const long SSL_OP_NO_DTLSv1_2 = 0; + long (*DTLS_set_link_mtu)(SSL *, long) = NULL; + +From ec2a1701a34a28783e2353befb9c5c057f65d782 Mon Sep 17 00:00:00 2001 +From: Charlie Li <git@vishwin.info> +Date: Mon, 19 Apr 2021 17:41:33 -0400 +Subject: [PATCH 2/4] Fix preprocessor guards for LibreSSL's SSL_OP_NO_DTLS* + +DTLS_set_link_mtu and DTLS_get_link_min_mtu are not part of 3.3.2 +--- + src/_cffi_src/openssl/ssl.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index 23cbc5ff425..a0b1641454e 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -585,9 +585,11 @@ + static const long TLS_ST_OK = 0; + #endif + +-#if CRYPTOGRAPHY_IS_LIBRESSL && !CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER ++#if CRYPTOGRAPHY_IS_LIBRESSL ++#if !CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER + static const long SSL_OP_NO_DTLSv1 = 0; + static const long SSL_OP_NO_DTLSv1_2 = 0; ++#endif + long (*DTLS_set_link_mtu)(SSL *, long) = NULL; + long (*DTLS_get_link_min_mtu)(SSL *) = NULL; + #endif + +From 7d03d4477b4f06a3e1ec412afa0f2e4edb4e3893 Mon Sep 17 00:00:00 2001 +From: Charlie Li <git@vishwin.info> +Date: Mon, 19 Apr 2021 18:16:14 -0400 +Subject: [PATCH 3/4] Switch to LESS_THAN context for LibreSSL 3.3.2 + +While here, fix indents +--- + src/_cffi_src/openssl/cryptography.py | 8 ++++---- + src/_cffi_src/openssl/ssl.py | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py +index ab296343906..0b468c8d719 100644 +--- a/src/_cffi_src/openssl/cryptography.py ++++ b/src/_cffi_src/openssl/cryptography.py +@@ -33,10 +33,10 @@ + #endif + + #if CRYPTOGRAPHY_IS_LIBRESSL +- #define CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER \ +- (LIBRESSL_VERSION_NUMBER >= 0x3030200f) ++#define CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 \ ++ (LIBRESSL_VERSION_NUMBER < 0x3030200f) + #else +-#define CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER (0) ++#define CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 (0) + #endif + + #define CRYPTOGRAPHY_OPENSSL_110F_OR_GREATER \ +@@ -67,7 +67,7 @@ + + static const int CRYPTOGRAPHY_IS_LIBRESSL; + +-static const int CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER; ++static const int CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332; + """ + + FUNCTIONS = """ +diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py +index a0b1641454e..081ef041fa3 100644 +--- a/src/_cffi_src/openssl/ssl.py ++++ b/src/_cffi_src/openssl/ssl.py +@@ -586,7 +586,7 @@ + #endif + + #if CRYPTOGRAPHY_IS_LIBRESSL +-#if !CRYPTOGRAPHY_LIBRESSL_332_OR_GREATER ++#if CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332 + static const long SSL_OP_NO_DTLSv1 = 0; + static const long SSL_OP_NO_DTLSv1_2 = 0; + #endif + +From 843ef2dbfff33ea3018b04d926ccd6d1b629ef87 Mon Sep 17 00:00:00 2001 +From: Charlie Li <git@vishwin.info> +Date: Mon, 19 Apr 2021 18:22:20 -0400 +Subject: [PATCH 4/4] Remove extra C variable declaration + +The variable is not actually used from Python +--- + src/_cffi_src/openssl/cryptography.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/_cffi_src/openssl/cryptography.py b/src/_cffi_src/openssl/cryptography.py +index 0b468c8d719..b9c7a793b3b 100644 +--- a/src/_cffi_src/openssl/cryptography.py ++++ b/src/_cffi_src/openssl/cryptography.py +@@ -66,8 +66,6 @@ + static const int CRYPTOGRAPHY_NEEDS_OSRANDOM_ENGINE; + + static const int CRYPTOGRAPHY_IS_LIBRESSL; +- +-static const int CRYPTOGRAPHY_LIBRESSL_LESS_THAN_332; + """ + + FUNCTIONS = """ |