diff --git a/backport-provide-openssl-apis-related-to-SM-for-python.patch b/backport-provide-openssl-apis-related-to-SM-for-python.patch index db3c9d798e3020da71aeabc1d51768243e04e88d..b95d455404c9cdc410fccd6db6925e888eca59af 100644 --- a/backport-provide-openssl-apis-related-to-SM-for-python.patch +++ b/backport-provide-openssl-apis-related-to-SM-for-python.patch @@ -1,16 +1,16 @@ diff --git a/src/_cffi_src/openssl/evp.py b/src/_cffi_src/openssl/evp.py -index ad7a0e7..13069dc 100644 +index 44e8a6e..00a2b73 100644 --- a/src/_cffi_src/openssl/evp.py +++ b/src/_cffi_src/openssl/evp.py -@@ -36,6 +36,7 @@ static const int Cryptography_HAS_EVP_PKEY_get_set_tls_encodedpoint; - static const int Cryptography_HAS_ONESHOT_EVP_DIGEST_SIGN_VERIFY; +@@ -37,6 +37,7 @@ static const int Cryptography_HAS_EVP_PKEY_DHX; + static const int Cryptography_HAS_EVP_PKEY_get_set_tls_encodedpoint; static const long Cryptography_HAS_RAW_KEY; static const long Cryptography_HAS_EVP_DIGESTFINAL_XOF; +static const int EVP_PKEY_SM2; static const long Cryptography_HAS_300_FIPS; + static const long Cryptography_HAS_300_EVP_CIPHER; static const long Cryptography_HAS_EVP_PKEY_DH; - """ -@@ -89,6 +90,9 @@ int EVP_DigestSignFinal(EVP_MD_CTX *, unsigned char *, size_t *); +@@ -94,6 +95,9 @@ int EVP_DigestSignFinal(EVP_MD_CTX *, unsigned char *, size_t *); int EVP_DigestVerifyInit(EVP_MD_CTX *, EVP_PKEY_CTX **, const EVP_MD *, ENGINE *, EVP_PKEY *); @@ -20,14 +20,14 @@ index ad7a0e7..13069dc 100644 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *, ENGINE *); -@@ -165,6 +169,10 @@ EVP_PKEY *EVP_PKEY_new_raw_public_key(int, ENGINE *, const unsigned char *, +@@ -163,6 +167,9 @@ EVP_PKEY *EVP_PKEY_new_raw_public_key(int, ENGINE *, const unsigned char *, int EVP_PKEY_get_raw_private_key(const EVP_PKEY *, unsigned char *, size_t *); int EVP_PKEY_get_raw_public_key(const EVP_PKEY *, unsigned char *, size_t *); -+int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type); +void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); +const EVP_MD *EVP_sm3(void); + int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *); int EVP_default_properties_enable_fips(OSSL_LIB_CTX *, int); """ + diff --git a/python-cryptography.spec b/python-cryptography.spec index f3fb1edaa74d4d61e502b78626dd4e53fb315d15..0fe2798d1b00847819f68f21ac1a568e5e9f77c7 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -1,13 +1,14 @@ %global srcname cryptography Name: python-%{srcname} Version: 39.0.0 -Release: 2 +Release: 3 Summary: PyCA's cryptography library License: ASL 2.0 or BSD URL: https://cryptography.io/en/latest/ Source0: %{srcname}-%{version}.tar.gz Patch6001: backport-CVE-2023-23931.patch +Patch6002: backport-provide-openssl-apis-related-to-SM-for-python.patch BuildRequires: openssl-devel cargo BuildRequires: gcc @@ -82,6 +83,12 @@ EOF %doc README.rst docs %changelog +* Mon Mar 13 2023 zhuofeng -39.0.0-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: provide openssl apis related to SM for python + * Tue Feb 14 2023 zhuofeng - 39.0.0-2 - Type:CVE - CVE:CVE-2023-23931