nss/Feature-fix-sm3-code-error.patch
2024-04-18 18:29:53 +08:00

51 lines
1.7 KiB
Diff

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