1 Star 0 Fork 47

xuguangmin/nss

forked from src-openEuler/nss 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Feature-fix-sm3-code-error.patch 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
jinlun 提交于 2024-04-18 18:29 . fix sm3 code error
From d71c36d1c218a7bba38a7aaa7d31917d3551e7d5 Mon Sep 17 00:00:00 2001
From: jinlun <jinlun@huawei.com>
Date: Thu, 18 Apr 2024 18:22:39 +0800
Subject: [PATCH] fix sm3 code error
---
nss/lib/cryptohi/sechash.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/nss/lib/cryptohi/sechash.c b/nss/lib/cryptohi/sechash.c
index b288145..8d60fbc 100644
--- a/lib/cryptohi/sechash.c
+++ b/lib/cryptohi/sechash.c
@@ -196,16 +196,6 @@ const SECHashObject SECHashObjects[] = {
PK11_DigestFinal,
SHA224_BLOCK_LENGTH,
HASH_AlgSHA224 },
- { SM3_LENGTH,
- (void *(*)(void))sm3_NewContext,
- (void *(*)(void *))PK11_CloneContext,
- (void (*)(void *, PRBool))PK11_DestroyContext,
- (void (*)(void *))PK11_DigestBegin,
- (void (*)(void *, const unsigned char *, unsigned int))PK11_DigestOp,
- (void (*)(void *, unsigned char *, unsigned int *, unsigned int))
- PK11_DigestFinal,
- SM3_BLOCK_LENGTH,
- HASH_AlgSM3 },
{ SHA3_224_LENGTH,
(void *(*)(void))sha3_224_NewContext,
(void *(*)(void *))PK11_CloneContext,
@@ -246,6 +236,16 @@ const SECHashObject SECHashObjects[] = {
PK11_DigestFinal,
SHA3_512_BLOCK_LENGTH,
HASH_AlgSHA3_512 },
+ { SM3_LENGTH,
+ (void *(*)(void))sm3_NewContext,
+ (void *(*)(void *))PK11_CloneContext,
+ (void (*)(void *, PRBool))PK11_DestroyContext,
+ (void (*)(void *))PK11_DigestBegin,
+ (void (*)(void *, const unsigned char *, unsigned int))PK11_DigestOp,
+ (void (*)(void *, unsigned char *, unsigned int *, unsigned int))
+ PK11_DigestFinal,
+ SM3_BLOCK_LENGTH,
+ HASH_AlgSM3 },
};
const SECHashObject *
--
2.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xugmin/nss.git
git@gitee.com:xugmin/nss.git
xugmin
nss
nss
master

搜索帮助