Also refreshed patches.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
include $(TOPDIR)/rules.mk
PKG_NAME:=python-cryptography
-PKG_VERSION:=3.1.1
+PKG_VERSION:=3.2.1
PKG_RELEASE:=1
PYPI_NAME:=cryptography
-PKG_HASH:=9d9fc6a16357965d282dd4ab6531013935425d0dc4950df2e0cf2a1b1ac1017d
+PKG_HASH:=d3d5e10be0cf2a12214ddee45c6bd203dab435e3d83b4560c03066eda600bfe3
PKG_LICENSE:=Apache-2.0 BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE.APACHE LICENSE.BSD
src/_cffi_src/openssl/asn1.py | 8 ++++++++
1 file changed, 8 insertions(+)
-diff --git a/src/_cffi_src/openssl/asn1.py b/src/_cffi_src/openssl/asn1.py
-index da55b670..85cd58bd 100644
--- a/src/_cffi_src/openssl/asn1.py
+++ b/src/_cffi_src/openssl/asn1.py
@@ -45,6 +45,7 @@ void ASN1_OBJECT_free(ASN1_OBJECT *);
+#define ASN1_STRING_data ASN1_STRING_get0_data
+#endif
"""
---
-2.26.2
-
src/cryptography/hazmat/bindings/openssl/_conditional.py | 9 +++++++++
2 files changed, 17 insertions(+)
-diff --git a/src/_cffi_src/openssl/x509_vfy.py b/src/_cffi_src/openssl/x509_vfy.py
-index d2bc5f4e..a1730738 100644
--- a/src/_cffi_src/openssl/x509_vfy.py
+++ b/src/_cffi_src/openssl/x509_vfy.py
@@ -22,6 +22,7 @@ TYPES = """
typedef ... Cryptography_STACK_OF_ASN1_OBJECT;
typedef ... Cryptography_STACK_OF_X509_OBJECT;
-@@ -274,4 +275,11 @@ void (*X509_STORE_set_get_issuer)(X509_STORE *,
+@@ -274,4 +275,11 @@ void (*X509_STORE_set_get_issuer)(X509_S
#else
static const long Cryptography_HAS_X509_STORE_CTX_GET_ISSUER = 1;
#endif
+static const long Cryptography_HAS_X509_CB_ISSUER_CHECK = 1;
+#endif
"""
-diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
-index 9cf489ac..23dc38a4 100644
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
-@@ -287,6 +287,12 @@ def cryptography_has_srtp():
+@@ -291,6 +291,12 @@ def cryptography_has_srtp():
]
# This is a mapping of
# {condition: function-returning-names-dependent-on-that-condition} so we can
# loop over them and delete unsupported names at runtime. It will be removed
-@@ -338,4 +344,7 @@ CONDITIONAL_NAMES = {
+@@ -342,4 +348,7 @@ CONDITIONAL_NAMES = {
"Cryptography_HAS_ENGINE": cryptography_has_engine,
"Cryptography_HAS_VERIFIED_CHAIN": cryptography_has_verified_chain,
"Cryptography_HAS_SRTP": cryptography_has_srtp,
+ cryptography_has_x509_cb_issuer_check
+ ),
}
---
-2.26.2
-
.../hazmat/bindings/openssl/_conditional.py | 36 +++++++++++++++
2 files changed, 77 insertions(+), 4 deletions(-)
-diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
-index c38e309a..e726417d 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
-@@ -15,8 +15,9 @@ static const long Cryptography_HAS_SSL_ST;
+@@ -15,8 +15,9 @@ static const long Cryptography_HAS_SSL_S
static const long Cryptography_HAS_TLS_ST;
static const long Cryptography_HAS_SSL2;
static const long Cryptography_HAS_SSL3_METHOD;
static const long Cryptography_HAS_TLSv1_3;
static const long Cryptography_HAS_SECURE_RENEGOTIATION;
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_CB;
-@@ -24,6 +25,7 @@ static const long Cryptography_HAS_STATUS_REQ_OCSP_RESP;
+@@ -24,6 +25,7 @@ static const long Cryptography_HAS_STATU
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_TYPE;
static const long Cryptography_HAS_SSL_CTX_CLEAR_OPTIONS;
static const long Cryptography_HAS_DTLS;
static const long Cryptography_HAS_SIGALGS;
static const long Cryptography_HAS_PSK;
static const long Cryptography_HAS_CIPHER_DETAILS;
-@@ -596,8 +598,43 @@ static const long Cryptography_HAS_STATUS_REQ_OCSP_RESP = 1;
+@@ -596,8 +598,43 @@ static const long Cryptography_HAS_STATU
static const long Cryptography_HAS_TLSEXT_STATUS_REQ_TYPE = 1;
static const long Cryptography_HAS_RELEASE_BUFFERS = 1;
static const long Cryptography_HAS_OP_NO_COMPRESSION = 1;
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;
-diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
-index 23dc38a4..c0dca00a 100644
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
@@ -33,6 +33,38 @@ def cryptography_has_ssl3_method():
def cryptography_has_102_verification():
return [
"X509_V_ERR_SUITE_B_INVALID_VERSION",
-@@ -303,6 +335,10 @@ CONDITIONAL_NAMES = {
+@@ -307,6 +339,10 @@ CONDITIONAL_NAMES = {
"Cryptography_HAS_RSA_OAEP_MD": cryptography_has_rsa_oaep_md,
"Cryptography_HAS_RSA_OAEP_LABEL": cryptography_has_rsa_oaep_label,
"Cryptography_HAS_SSL3_METHOD": cryptography_has_ssl3_method,
"Cryptography_HAS_102_VERIFICATION": cryptography_has_102_verification,
"Cryptography_HAS_110_VERIFICATION_PARAMS": (
cryptography_has_110_verification_params
---
-2.26.2
-
src/cryptography/hazmat/backends/openssl/ciphers.py | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
-diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py
-index d7ac93e6..0b3e067d 100644
--- a/src/_cffi_src/openssl/evp.py
+++ b/src/_cffi_src/openssl/evp.py
-@@ -48,6 +48,7 @@ int EVP_CipherUpdate(EVP_CIPHER_CTX *, unsigned char *, int *,
+@@ -48,6 +48,7 @@ int EVP_CipherUpdate(EVP_CIPHER_CTX *, u
const unsigned char *, int);
int EVP_CipherFinal_ex(EVP_CIPHER_CTX *, unsigned char *, int *);
int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *);
int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *, int);
-@@ -273,4 +274,13 @@ static const long Cryptography_HAS_EVP_DIGESTFINAL_XOF = 1;
+@@ -273,4 +274,13 @@ static const long Cryptography_HAS_EVP_D
#ifndef EVP_PKEY_POLY1305
#define EVP_PKEY_POLY1305 NID_poly1305
#endif
+#define OpenSSL_add_all_algorithms() do {} while(0)
+#endif
"""
-diff --git a/src/cryptography/hazmat/backends/openssl/ciphers.py b/src/cryptography/hazmat/backends/openssl/ciphers.py
-index 171605a6..4c0504ca 100644
--- a/src/cryptography/hazmat/backends/openssl/ciphers.py
+++ b/src/cryptography/hazmat/backends/openssl/ciphers.py
@@ -199,7 +199,7 @@ class _CipherContext(object):
self._backend.openssl_assert(res == 1)
return self._backend._ffi.buffer(buf)[: outlen[0]]
---
-2.26.2
-
.../hazmat/backends/openssl/x509.py | 8 ++---
3 files changed, 36 insertions(+), 10 deletions(-)
-diff --git a/src/_cffi_src/openssl/x509.py b/src/_cffi_src/openssl/x509.py
-index b88daa1f..54cd66c9 100644
--- a/src/_cffi_src/openssl/x509.py
+++ b/src/_cffi_src/openssl/x509.py
@@ -202,8 +202,10 @@ long X509_get_version(X509 *);
long X509_REQ_get_version(X509_REQ *);
X509_NAME *X509_REQ_get_subject_name(X509_REQ *);
-@@ -235,6 +237,8 @@ X509_CRL *sk_X509_CRL_value(Cryptography_STACK_OF_X509_CRL *, int);
+@@ -235,6 +237,8 @@ X509_CRL *sk_X509_CRL_value(Cryptography
long X509_CRL_get_version(X509_CRL *);
ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *);
ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *);
X509_NAME *X509_CRL_get_issuer(X509_CRL *);
Cryptography_STACK_OF_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *);
-@@ -243,8 +247,11 @@ int X509_CRL_set_lastUpdate(X509_CRL *, ASN1_TIME *);
+@@ -243,8 +247,11 @@ int X509_CRL_set_lastUpdate(X509_CRL *,
int X509_CRL_set_nextUpdate(X509_CRL *, ASN1_TIME *);
int X509_set_notBefore(X509 *, ASN1_TIME *);
int X509_set_notAfter(X509 *, ASN1_TIME *);
EC_KEY *d2i_EC_PUBKEY_bio(BIO *, EC_KEY **);
int i2d_EC_PUBKEY_bio(BIO *, EC_KEY *);
-@@ -339,6 +346,25 @@ const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x)
+@@ -339,6 +346,25 @@ const ASN1_INTEGER *X509_REVOKED_get0_se
#define X509_set1_notAfter X509_set_notAfter
#define X509_getm_notAfter X509_get_notAfter
#define X509_getm_notBefore X509_get_notBefore
+#define X509_CRL_set1_nextUpdate X509_CRL_set_nextUpdate
+#define X509_CRL_get0_lastUpdate X509_CRL_get_lastUpdate
+#define X509_CRL_get0_nextUpdate X509_CRL_get_nextUpdate
-+#endif
+ #endif
#endif
+
+#if (OPENSSL_API_COMPAT >= 0x10100000L) && !CRYPTOGRAPHY_IS_LIBRESSL
+#define X509_CRL_get_nextUpdate X509_CRL_get0_nextUpdate
+#define X509_CRL_set_lastUpdate X509_CRL_set1_lastUpdate
+#define X509_CRL_set_nextUpdate X509_CRL_set1_nextUpdate
- #endif
++#endif
"""
-diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
-index 97c7fd05..891d6309 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
-@@ -1129,12 +1129,12 @@ class Backend(object):
+@@ -1127,12 +1127,12 @@ class Backend(object):
# Set the last update time.
last_update = self._create_asn1_time(builder._last_update)
self.openssl_assert(res == 1)
# Add extensions.
-diff --git a/src/cryptography/hazmat/backends/openssl/x509.py b/src/cryptography/hazmat/backends/openssl/x509.py
-index 4d0dac76..074211e6 100644
--- a/src/cryptography/hazmat/backends/openssl/x509.py
+++ b/src/cryptography/hazmat/backends/openssl/x509.py
@@ -86,12 +86,12 @@ class _Certificate(object):
return _parse_asn1_time(self._backend, asn1_time)
@property
-@@ -277,13 +277,13 @@ class _CertificateRevocationList(object):
+@@ -277,13 +277,13 @@ class _CertificateRevocationList(object)
@property
def next_update(self):
self._backend.openssl_assert(lu != self._backend._ffi.NULL)
return _parse_asn1_time(self._backend, lu)
---
-2.26.2
-
src/_cffi_src/openssl/x509_vfy.py | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
-diff --git a/src/_cffi_src/openssl/x509_vfy.py b/src/_cffi_src/openssl/x509_vfy.py
-index a1730738..cd143ea0 100644
--- a/src/_cffi_src/openssl/x509_vfy.py
+++ b/src/_cffi_src/openssl/x509_vfy.py
-@@ -157,8 +157,12 @@ int X509_STORE_CTX_init(X509_STORE_CTX *, X509_STORE *, X509 *,
+@@ -157,8 +157,12 @@ int X509_STORE_CTX_init(X509_STORE_CTX *
Cryptography_STACK_OF_X509 *);
void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *,
Cryptography_STACK_OF_X509 *);
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *);
void X509_STORE_CTX_set0_param(X509_STORE_CTX *, X509_VERIFY_PARAM *);
int X509_STORE_CTX_set_default(X509_STORE_CTX *, const char *);
-@@ -282,4 +286,15 @@ static const long Cryptography_HAS_X509_CB_ISSUER_CHECK = 0;
+@@ -282,4 +286,15 @@ static const long Cryptography_HAS_X509_
#else
static const long Cryptography_HAS_X509_CB_ISSUER_CHECK = 1;
#endif
+#define X509_STORE_CTX_get_chain X509_STORE_CTX_get1_chain
+#endif
"""
---
-2.26.2
-
src/_cffi_src/openssl/ssl.py | 5 +++++
3 files changed, 13 insertions(+)
-diff --git a/src/_cffi_src/openssl/conf.py b/src/_cffi_src/openssl/conf.py
-index 9db0162a..6b474d42 100644
--- a/src/_cffi_src/openssl/conf.py
+++ b/src/_cffi_src/openssl/conf.py
@@ -18,4 +18,8 @@ void OPENSSL_no_config(void);
+#define OPENSSL_no_config() 0
+#endif
"""
-diff --git a/src/_cffi_src/openssl/crypto.py b/src/_cffi_src/openssl/crypto.py
-index f3623b21..85541b31 100644
--- a/src/_cffi_src/openssl/crypto.py
+++ b/src/_cffi_src/openssl/crypto.py
-@@ -124,4 +124,8 @@ void *Cryptography_realloc_wrapper(void *ptr, size_t size, const char *path,
+@@ -124,4 +124,8 @@ void *Cryptography_realloc_wrapper(void
void Cryptography_free_wrapper(void *ptr, const char *path, int line) {
free(ptr);
}
+#define CRYPTO_get_locking_callback() 0
+#endif
"""
-diff --git a/src/_cffi_src/openssl/ssl.py b/src/_cffi_src/openssl/ssl.py
-index e726417d..68c42160 100644
--- a/src/_cffi_src/openssl/ssl.py
+++ b/src/_cffi_src/openssl/ssl.py
-@@ -792,4 +792,9 @@ int (*SSL_CTX_set_max_early_data)(SSL_CTX *, uint32_t) = NULL;
+@@ -792,4 +792,9 @@ int (*SSL_CTX_set_max_early_data)(SSL_CT
#else
static const long Cryptography_HAS_TLSv1_3 = 1;
#endif
+#define SSL_load_error_strings() 0
+#endif
"""
---
-2.26.2
-