diff --git a/Feature-fix-sm3-code-error.patch b/Feature-fix-sm3-code-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..7f64bb4741929671ecfdec1aa18eead8597e9987 --- /dev/null +++ b/Feature-fix-sm3-code-error.patch @@ -0,0 +1,50 @@ +From d71c36d1c218a7bba38a7aaa7d31917d3551e7d5 Mon Sep 17 00:00:00 2001 +From: jinlun +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 + diff --git a/nss.spec b/nss.spec index 63b309bb0e3120998d52eac966a27a02f40c0697..fcb53c21a071f1ff0fe452d22a2f67bbd573200e 100644 --- a/nss.spec +++ b/nss.spec @@ -15,7 +15,7 @@ Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 4 +Release: 5 License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Provides: nss-system-init @@ -48,6 +48,7 @@ Patch9002: Feature-nss-support-SM3-digest-algorithm.patch Patch9003: Feature-nss-support-SM2-signature-algorithm.patch Patch9004: Feature-nss-fix-the-certificate-resolution-in-sm2.patch Patch9005: Feature-fix-sm2-sm3-code-error.patch +Patch9006: Feature-fix-sm3-code-error.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -137,6 +138,7 @@ pushd nss %patch9003 -p1 %patch9004 -p1 %patch9005 -p1 +%patch9006 -p1 popd %build @@ -559,6 +561,9 @@ update-crypto-policies &>/dev/null||: %doc %{_mandir}/man* %changelog +* Thu Apr 18 2024 jinlun - 3.94.0-5 +- fix sm3 code error + * Mon Jan 22 2024 jinlun - 3.94.0-4 - fix sm2 sm3 code error