diff --git a/Feature-PKCS7-sign-and-verify-support-SM2-algorithm.patch b/Feature-PKCS7-sign-and-verify-support-SM2-algorithm.patch index 73de05090108b80e7b503d453d7ddf25981f664b..fc588ada8c238200a07988b1edb18fa5973c8bbc 100644 --- a/Feature-PKCS7-sign-and-verify-support-SM2-algorithm.patch +++ b/Feature-PKCS7-sign-and-verify-support-SM2-algorithm.patch @@ -1,15 +1,16 @@ -From 95ae0cd988b4a556c1719f84af3fe3a116352fd7 Mon Sep 17 00:00:00 2001 +From fa3d5b8af929c296f4d684345dedf1e2b4b390e2 Mon Sep 17 00:00:00 2001 From: gaoyusong Date: Fri, 30 Sep 2022 12:10:15 +0800 Subject: [PATCH] PKCS7 sign and verify support SM2 algorithm +Signed-off-by: Huaxin Lu --- - crypto/pkcs7/pk7_doit.c | 28 +++++++++++++++++++++------- + crypto/pkcs7/pk7_doit.c | 23 +++++++++++++++++++++-- crypto/sm2/sm2_pmeth.c | 1 + - 2 files changed, 22 insertions(+), 7 deletions(-) + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/crypto/pkcs7/pk7_doit.c b/crypto/pkcs7/pk7_doit.c -index f63fbc5..2e86cce 100644 +index f63fbc5..916a35a 100644 --- a/crypto/pkcs7/pk7_doit.c +++ b/crypto/pkcs7/pk7_doit.c @@ -946,6 +946,9 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, @@ -43,16 +44,10 @@ index f63fbc5..2e86cce 100644 goto err; alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf, -@@ -1030,13 +1045,12 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, +@@ -1036,7 +1051,11 @@ int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, + goto err; } - os = si->enc_digest; -- pkey = X509_get0_pubkey(x509); -- if (!pkey) { -- ret = -1; -- goto err; -- } - - i = EVP_VerifyFinal(mdc_tmp, os->data, os->length, pkey); + i = +#ifndef OPENSSL_NO_SM2 diff --git a/openssl.spec b/openssl.spec index 80c57de4b8175bc99a6f274a6e56435a97fb2052..00beec37874283b9f95f2c17c78218ce847abc13 100644 --- a/openssl.spec +++ b/openssl.spec @@ -2,7 +2,7 @@ Name: openssl Epoch: 1 Version: 1.1.1m -Release: 10 +Release: 11 Summary: Cryptography and SSL/TLS Toolkit License: OpenSSL and SSLeay URL: https://www.openssl.org/ @@ -237,6 +237,9 @@ make test || : %ldconfig_scriptlets libs %changelog +* Wed Oct 26 2022 luhuaxin - 1:1.1.1m-11 +- fix cms testcase + * Fri Oct 21 2022 luhuaxin - 1:1.1.1m-10 - add support for SM2 PKCS7