!152 fix cms testcase
From: @HuaxinLuGitee Reviewed-by: @zcfsite Signed-off-by: @zcfsite
This commit is contained in:
commit
8b90839040
@ -1,15 +1,16 @@
|
|||||||
From 95ae0cd988b4a556c1719f84af3fe3a116352fd7 Mon Sep 17 00:00:00 2001
|
From fa3d5b8af929c296f4d684345dedf1e2b4b390e2 Mon Sep 17 00:00:00 2001
|
||||||
From: gaoyusong <gaoyusong2@huawei.com>
|
From: gaoyusong <gaoyusong2@huawei.com>
|
||||||
Date: Fri, 30 Sep 2022 12:10:15 +0800
|
Date: Fri, 30 Sep 2022 12:10:15 +0800
|
||||||
Subject: [PATCH] PKCS7 sign and verify support SM2 algorithm
|
Subject: [PATCH] PKCS7 sign and verify support SM2 algorithm
|
||||||
|
|
||||||
|
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
|
||||||
---
|
---
|
||||||
crypto/pkcs7/pk7_doit.c | 28 +++++++++++++++++++++-------
|
crypto/pkcs7/pk7_doit.c | 23 +++++++++++++++++++++--
|
||||||
crypto/sm2/sm2_pmeth.c | 1 +
|
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
|
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
|
--- a/crypto/pkcs7/pk7_doit.c
|
||||||
+++ b/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,
|
@@ -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;
|
goto err;
|
||||||
|
|
||||||
alen = ASN1_item_i2d((ASN1_VALUE *)sk, &abuf,
|
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 = EVP_VerifyFinal(mdc_tmp, os->data, os->length, pkey);
|
||||||
+ i =
|
+ i =
|
||||||
+#ifndef OPENSSL_NO_SM2
|
+#ifndef OPENSSL_NO_SM2
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
Name: openssl
|
Name: openssl
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.1.1m
|
Version: 1.1.1m
|
||||||
Release: 10
|
Release: 11
|
||||||
Summary: Cryptography and SSL/TLS Toolkit
|
Summary: Cryptography and SSL/TLS Toolkit
|
||||||
License: OpenSSL and SSLeay
|
License: OpenSSL and SSLeay
|
||||||
URL: https://www.openssl.org/
|
URL: https://www.openssl.org/
|
||||||
@ -237,6 +237,9 @@ make test || :
|
|||||||
%ldconfig_scriptlets libs
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Oct 26 2022 luhuaxin <luhuaxin1@huawei.com> - 1:1.1.1m-11
|
||||||
|
- fix cms testcase
|
||||||
|
|
||||||
* Fri Oct 21 2022 luhuaxin <luhuaxin1@huawei.com> - 1:1.1.1m-10
|
* Fri Oct 21 2022 luhuaxin <luhuaxin1@huawei.com> - 1:1.1.1m-10
|
||||||
- add support for SM2 PKCS7
|
- add support for SM2 PKCS7
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user