fix cms testcase
This commit is contained in:
parent
389fcf1d99
commit
1db916a40f
@ -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>
|
||||
Date: Fri, 30 Sep 2022 12:10:15 +0800
|
||||
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 +
|
||||
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
|
||||
|
||||
@ -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 <luhuaxin1@huawei.com> - 1:1.1.1m-11
|
||||
- fix cms testcase
|
||||
|
||||
* Fri Oct 21 2022 luhuaxin <luhuaxin1@huawei.com> - 1:1.1.1m-10
|
||||
- add support for SM2 PKCS7
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user