48 lines
1.2 KiB
Diff
48 lines
1.2 KiB
Diff
From 4d2f5853379d2d1f3afe1954df746b075926de88 Mon Sep 17 00:00:00 2001
|
|
From: wang--ge <wang__ge@126.com>
|
|
Date: Fri, 6 Dec 2024 16:14:51 +0800
|
|
Subject: [PATCH] revert a dose not work feature 12f1671
|
|
|
|
---
|
|
src/cms_common.c | 17 ++---------------
|
|
1 file changed, 2 insertions(+), 15 deletions(-)
|
|
|
|
diff --git a/src/cms_common.c b/src/cms_common.c
|
|
index 228d0ab..85c9205 100644
|
|
--- a/src/cms_common.c
|
|
+++ b/src/cms_common.c
|
|
@@ -406,8 +406,6 @@ static SECStatus
|
|
is_valid_cert_without_private_key(CERTCertificate *cert, void *data)
|
|
{
|
|
struct validity_cbdata *cbd = (struct validity_cbdata *)data;
|
|
- PK11SlotInfo *slot = cbd->slot;
|
|
- SECKEYPrivateKey *privkey = NULL;
|
|
int errnum;
|
|
|
|
errnum = PORT_GetError();
|
|
@@ -422,19 +420,8 @@ is_valid_cert_without_private_key(CERTCertificate *cert, void *data)
|
|
return SECFailure;
|
|
}
|
|
|
|
- privkey = PK11_FindPrivateKeyFromCert(slot, cert, cbd->cms);
|
|
- if (privkey == NULL) {
|
|
- if (cbd->cert)
|
|
- CERT_DestroyCertificate(cbd->cert);
|
|
- PORT_SetError(0);
|
|
- cbd->cert = CERT_DupCertificate(cert);
|
|
- CERT_DestroyCertificate(cert);
|
|
- return SECSuccess;
|
|
- } else {
|
|
- SECKEY_DestroyPrivateKey(privkey);
|
|
- CERT_DestroyCertificate(cert);
|
|
- }
|
|
- return SECFailure;
|
|
+ cbd->cert = cert;
|
|
+ return SECSuccess;
|
|
}
|
|
|
|
int
|
|
--
|
|
2.43.0
|
|
|