diff --git a/fix_undefined_symbol_EVP_PKEY_set_alias_type.patch b/fix_undefined_symbol_EVP_PKEY_set_alias_type.patch new file mode 100644 index 0000000000000000000000000000000000000000..a75f310ac6c0ea08b4288f29929f194dc58693b8 --- /dev/null +++ b/fix_undefined_symbol_EVP_PKEY_set_alias_type.patch @@ -0,0 +1,53 @@ +diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py +index f4d9fb9..eafedec 100644 +--- a/src/_cffi_src/openssl/evp.py ++++ b/src/_cffi_src/openssl/evp.py +@@ -31,6 +31,7 @@ static const int EVP_CTRL_AEAD_SET_IVLEN; + static const int EVP_CTRL_AEAD_GET_TAG; + static const int EVP_CTRL_AEAD_SET_TAG; + ++static const int Cryptography_HAS_EVP_PKEY_set_alias_type; + static const int Cryptography_HAS_SCRYPT; + static const int Cryptography_HAS_EVP_PKEY_DHX; + static const int Cryptography_HAS_EVP_PKEY_get_set_tls_encodedpoint; +@@ -185,6 +186,14 @@ void Cryptography_EVP_MD_CTX_free(EVP_MD_CTX *md) { + EVP_MD_CTX_free(md); + } + ++#if CRYPTOGRAPHY_IS_LIBRESSL || CRYPTOGRAPHY_OPENSSL_300_OR_GREATER || \ ++ CRYPTOGRAPHY_IS_BORINGSSL ++static const int Cryptography_HAS_EVP_PKEY_set_alias_type = 0; ++int (*EVP_PKEY_set_alias_type)(EVP_PKEY *, int) = NULL; ++#else ++static const int Cryptography_HAS_EVP_PKEY_set_alias_type = 1; ++#endif ++ + #if CRYPTOGRAPHY_IS_LIBRESSL || defined(OPENSSL_NO_SCRYPT) + static const long Cryptography_HAS_SCRYPT = 0; + int (*EVP_PBE_scrypt)(const char *, size_t, const unsigned char *, size_t, +diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py +index 10f307a..46159ed 100644 +--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py ++++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py +@@ -45,6 +45,11 @@ def cryptography_has_tls_st() -> typing.List[str]: + "TLS_ST_OK", + ] + ++def cryptography_has_evp_pkey_set_alias_type() -> typing.List[str]: ++ return [ ++ "EVP_PKEY_set_alias_type", ++ ] ++ + + def cryptography_has_scrypt() -> typing.List[str]: + return [ +@@ -335,6 +340,9 @@ CONDITIONAL_NAMES = { + "Cryptography_HAS_SET_CERT_CB": cryptography_has_set_cert_cb, + "Cryptography_HAS_SSL_ST": cryptography_has_ssl_st, + "Cryptography_HAS_TLS_ST": cryptography_has_tls_st, ++ "Cryptography_HAS_EVP_PKEY_set_alias_type": ( ++ cryptography_has_evp_pkey_set_alias_type ++ ), + "Cryptography_HAS_SCRYPT": cryptography_has_scrypt, + "Cryptography_HAS_EVP_PKEY_DHX": cryptography_has_evp_pkey_dhx, + "Cryptography_HAS_MEM_FUNCTIONS": cryptography_has_mem_functions, diff --git a/python-cryptography.spec b/python-cryptography.spec index 7986b42239ef0dee3fb8e8ae5f065c5ed25f35ff..2f6245088f79f4bdbb13ef97aef7feee1829ac30 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,7 +1,7 @@ %global srcname cryptography Name: python-%{srcname} Version: 38.0.2 -Release: 1 +Release: 2 Summary: PyCA's cryptography library License: ASL 2.0 or BSD URL: https://cryptography.io/en/latest/ @@ -14,6 +14,7 @@ Source0: %{srcname}-%{version}.tar.gz Source1: cargo-vendor-cache.tar.gz Patch6002: backport-provide-openssl-apis-related-to-SM-for-python.patch +Patch6003: fix_undefined_symbol_EVP_PKEY_set_alias_type.patch BuildRequires: openssl-devel cargo BuildRequires: gcc @@ -90,6 +91,9 @@ EOF %doc README.rst docs %changelog +* Tue May 07 2024 tzing_t - 38.0.2-2 +- fix undefined symbol EVP_PKEY_set_alias_type + * Fri Apr 19 2024 tzing_t - 38.0.2-1 - Upgrade package to version 38.0.2