python-cryptography: bump to version 3.2.1 13830/head
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 2 Nov 2020 11:38:03 +0000 (13:38 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Mon, 2 Nov 2020 13:57:58 +0000 (15:57 +0200)
Also refreshed patches.

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python/python-cryptography/Makefile
lang/python/python-cryptography/patches/010-Add-new-ASN1_STRING_get0_data-API.patch
lang/python/python-cryptography/patches/020-Add-compatibility-for-X509_STORE_set_get_issuer.patch
lang/python/python-cryptography/patches/030-Add-compatibility-for-deprecated-TLS-methods.patch
lang/python/python-cryptography/patches/040-Replace-EVP_CIPHER_CTX_cleanup-with-EVP_CIPHER_CTX_r.patch
lang/python/python-cryptography/patches/050-Switch-get_-Update-APIs-to-get0.patch
lang/python/python-cryptography/patches/060-Add-X509_STORE_CTX_trusted_stack-compatibility-macro.patch
lang/python/python-cryptography/patches/070-Add-defines-for-totally-deprecated-functions.patch

index 3e0ebdc74e8e2c34ff807055ceaa6f7bb892fa3d..aefc728e5e3c8da1da08d7d24c2d2a77343c548c 100644 (file)
@@ -8,11 +8,11 @@
 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
index 0a637dc7c99ea232c2164640fb11b51645634b1e..3857a787a085dd09d704bad4bb2209f21acc813a 100644 (file)
@@ -8,8 +8,6 @@ Introduced with OpenSSL 1.1
  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 *);
@@ -32,6 +30,3 @@ index da55b670..85cd58bd 100644
 +#define ASN1_STRING_data ASN1_STRING_get0_data
 +#endif
  """
--- 
-2.26.2
-
index 25fed080761a868cdf433afc603d8588e34658ea..8f5cb784e9602774baa41890f07a06b8f1dd4397 100644 (file)
@@ -9,8 +9,6 @@ Deprecated under OpenSSL 1.1.
  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 = """
@@ -21,7 +19,7 @@ index d2bc5f4e..a1730738 100644
  
  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
@@ -33,11 +31,9 @@ index d2bc5f4e..a1730738 100644
 +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():
      ]
  
  
@@ -50,7 +46,7 @@ index 9cf489ac..23dc38a4 100644
  # 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,
@@ -58,6 +54,3 @@ index 9cf489ac..23dc38a4 100644
 +        cryptography_has_x509_cb_issuer_check
 +    ),
  }
--- 
-2.26.2
-
index fcc17e19f3253735146ac79c15de9f1b11103585..2050e464c51903bb05b537d57441a97a78eacb64 100644 (file)
@@ -8,11 +8,9 @@ Subject: [PATCH] Add compatibility for deprecated TLS methods
  .../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;
@@ -24,7 +22,7 @@ index c38e309a..e726417d 100644
  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;
@@ -32,7 +30,7 @@ index c38e309a..e726417d 100644
  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;
@@ -78,8 +76,6 @@ index c38e309a..e726417d 100644
  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():
@@ -121,7 +117,7 @@ index 23dc38a4..c0dca00a 100644
  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,
@@ -132,6 +128,3 @@ index 23dc38a4..c0dca00a 100644
      "Cryptography_HAS_102_VERIFICATION": cryptography_has_102_verification,
      "Cryptography_HAS_110_VERIFICATION_PARAMS": (
          cryptography_has_110_verification_params
--- 
-2.26.2
-
index 8ed4210a56921e89642f577e387bab9be6199902..8193644135d52430f6131b8262abd6a3666d7314 100644 (file)
@@ -9,11 +9,9 @@ Deprecated in OpenSSL 1.1
  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 *);
@@ -21,7 +19,7 @@ index d7ac93e6..0b3e067d 100644
  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
@@ -35,8 +33,6 @@ index d7ac93e6..0b3e067d 100644
 +#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):
@@ -48,6 +44,3 @@ index 171605a6..4c0504ca 100644
          self._backend.openssl_assert(res == 1)
          return self._backend._ffi.buffer(buf)[: outlen[0]]
  
--- 
-2.26.2
-
index 9d609415b5282b0dfe10686acf1aea630700bec6..b73e3b653c71792933efc288642d0460a0c602c7 100644 (file)
@@ -10,8 +10,6 @@ Deprecated in 1.1
  .../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 *);
@@ -27,7 +25,7 @@ index b88daa1f..54cd66c9 100644
  
  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 *);
@@ -36,7 +34,7 @@ index b88daa1f..54cd66c9 100644
  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 *);
@@ -50,7 +48,7 @@ index b88daa1f..54cd66c9 100644
  
  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
@@ -61,7 +59,7 @@ index b88daa1f..54cd66c9 100644
 +#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
@@ -74,13 +72,11 @@ index b88daa1f..54cd66c9 100644
 +#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)
@@ -95,8 +91,6 @@ index 97c7fd05..891d6309 100644
          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):
@@ -114,7 +108,7 @@ index 4d0dac76..074211e6 100644
          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):
@@ -130,6 +124,3 @@ index 4d0dac76..074211e6 100644
          self._backend.openssl_assert(lu != self._backend._ffi.NULL)
          return _parse_asn1_time(self._backend, lu)
  
--- 
-2.26.2
-
index cc2f0349ccc3297f267d40db924a826f6e9dac8f..048d474494fddb03d8b8ed162efe3c53098839ae 100644 (file)
@@ -10,11 +10,9 @@ Signed-off-by: Rosen Penev <rosenp@gmail.com>
  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 *);
@@ -28,7 +26,7 @@ index a1730738..cd143ea0 100644
  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
@@ -44,6 +42,3 @@ index a1730738..cd143ea0 100644
 +#define X509_STORE_CTX_get_chain X509_STORE_CTX_get1_chain
 +#endif
  """
--- 
-2.26.2
-
index e6d8736b81e6972f3fd36262856db09d2abd29a5..29bea068c119a980c229391000410a2d7af3a9bd 100644 (file)
@@ -9,8 +9,6 @@ Subject: [PATCH] Add defines for totally deprecated functions
  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);
@@ -22,11 +20,9 @@ index 9db0162a..6b474d42 100644
 +#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);
  }
@@ -35,11 +31,9 @@ index f3623b21..85541b31 100644
 +#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
@@ -49,6 +43,3 @@ index e726417d..68c42160 100644
 +#define SSL_load_error_strings() 0
 +#endif
  """
--- 
-2.26.2
-