代码拉取完成,页面将自动刷新
From 2e14b6a91835095720db3ce62949c725e1e44cf1 Mon Sep 17 00:00:00 2001
From: jinlun <jinlun@huawei.com>
Date: Mon, 11 Sep 2023 19:24:37 +0800
Subject: [PATCH] pesign support SM3 digest algorithm.
---
src/cms_common.c | 9 +++++++++
src/cms_common.h | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/cms_common.c b/src/cms_common.c
index 228d0ab..7b5abc5 100644
--- a/src/cms_common.c
+++ b/src/cms_common.c
@@ -56,6 +56,15 @@ const struct digest_param digest_params[] = {
.size = 20
},
#endif
+#if defined(CKM_SM2_WITH_SM3) || defined(CKM_NSS_SM2_WITH_SM3)
+ {.name = "sm3",
+ .digest_tag = SEC_OID_SM3,
+ .signature_tag = SEC_OID_SM2_WITH_SM3,
+ .digest_encryption_tag = SEC_OID_SM2_WITH_SM3,
+ .efi_guid = NULL,
+ .size = 32
+ },
+#endif
};
const unsigned int n_digest_params = sizeof (digest_params) / sizeof (digest_params[0]);
diff --git a/src/cms_common.h b/src/cms_common.h
index 35a128a..73c596f 100644
--- a/src/cms_common.h
+++ b/src/cms_common.h
@@ -76,7 +76,7 @@ struct digest_param {
int size;
};
-extern const struct digest_param digest_params[2];
+extern const struct digest_param digest_params[3];
extern const unsigned int n_digest_params;
typedef struct pk12_file {
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。