forked from pool/pesign
30 lines
746 B
Diff
30 lines
746 B
Diff
|
From a6062702e9f0002b86759f6cd14da6d78de99f22 Mon Sep 17 00:00:00 2001
|
||
|
From: Huaxin Lu <luhuaxin1@huawei.com>
|
||
|
Date: Fri, 11 Nov 2022 11:20:35 +0800
|
||
|
Subject: [PATCH] cms_common: fix cert match check
|
||
|
|
||
|
In find_certificate_by_callback(), the match() returns 1
|
||
|
when cert subject is matched.
|
||
|
|
||
|
Signed-off-by: Huaxin Lu <luhuaxin1@huawei.com>
|
||
|
---
|
||
|
src/cms_common.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/cms_common.c b/src/cms_common.c
|
||
|
index 24576f2..cf572ca 100644
|
||
|
--- a/src/cms_common.c
|
||
|
+++ b/src/cms_common.c
|
||
|
@@ -872,7 +872,7 @@ find_certificate_by_callback(cms_context *cms,
|
||
|
continue;
|
||
|
|
||
|
int rc = match(tmpnode->cert, cbdata);
|
||
|
- if (rc == 0) {
|
||
|
+ if (rc == 1) {
|
||
|
node = tmpnode;
|
||
|
break;
|
||
|
}
|
||
|
--
|
||
|
2.35.3
|
||
|
|