加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Feature-nss-fix-the-certificate-resolution-in-sm2.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
jinlun 提交于 2023-09-12 17:50 . fix the certificate resolution in sm2
From 5ad87d10b76fe5d4646d1f0a795580df20f0cd02 Mon Sep 17 00:00:00 2001
From: jinlun <jinlun@huawei.com>
Date: Tue, 12 Sep 2023 17:40:03 +0800
Subject: [PATCH] fix the certificate resolution in sm2
---
lib/cryptohi/seckey.c | 1 +
lib/softoken/pkcs11c.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/cryptohi/seckey.c b/lib/cryptohi/seckey.c
index 6a230e1..11a936e 100644
--- a/lib/cryptohi/seckey.c
+++ b/lib/cryptohi/seckey.c
@@ -639,6 +639,7 @@ seckey_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)
return pubk;
break;
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
+ case SEC_OID_SM2:
/* A basic sanity check on inputs. */
if (spki->algorithm.parameters.len == 0 || newOs.len == 0) {
PORT_SetError(SEC_ERROR_INPUT_LEN);
diff --git a/lib/softoken/pkcs11c.c b/lib/softoken/pkcs11c.c
index 2105cb5..5261a92 100644
--- a/lib/softoken/pkcs11c.c
+++ b/lib/softoken/pkcs11c.c
@@ -6199,6 +6199,7 @@ sftk_unwrapPrivateKey(SFTKObject *key, SECItem *bpki)
prepare_low_pqg_params_for_asn1(&lpk->u.dsa.params);
break;
/* case NSSLOWKEYDHKey: */
+ case SEC_OID_SM2:
case SEC_OID_ANSIX962_EC_PUBLIC_KEY:
keyTemplate = nsslowkey_ECPrivateKeyTemplate;
paramTemplate = NULL;
--
2.27.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化