From d8f27996560274d85c63f960a24f42fa86749f12 Mon Sep 17 00:00:00 2001 From: zhangkea Date: Thu, 16 Jun 2022 17:04:07 +0800 Subject: [PATCH 1/2] fix bogus date in %changelog --- pesign.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pesign.spec b/pesign.spec index 9fb6e65..7816492 100644 --- a/pesign.spec +++ b/pesign.spec @@ -94,7 +94,7 @@ exit 0 %{_mandir}/man*/* %changelog -* Sat July 31 2021 Shenmei Tu - 0.113-5 +* Sat Jul 31 2021 Shenmei Tu - 0.113-5 - remove-superfluous-type-settings.patch * Mon May 31 2021 huanghaitao - 0.113-4 -- Gitee From dac378a76bcb809834fbe3e19835902bd5fdfc62 Mon Sep 17 00:00:00 2001 From: Huaxin Lu Date: Wed, 26 Oct 2022 20:31:05 +0800 Subject: [PATCH 2/2] fix algorithm flag for sm2 and sm3 --- ... Feature-pesign-support-SM2-signature-algorithm.patch | 4 ++-- ... => Feature-pesign-support-SM3-digest-algorithm.patch | 2 +- pesign.spec | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) rename pesign-support-SM2-signature-algorithm.patch => Feature-pesign-support-SM2-signature-algorithm.patch (95%) rename pesign-support-SM3-digest-algorithm.patch => Feature-pesign-support-SM3-digest-algorithm.patch (92%) diff --git a/pesign-support-SM2-signature-algorithm.patch b/Feature-pesign-support-SM2-signature-algorithm.patch similarity index 95% rename from pesign-support-SM2-signature-algorithm.patch rename to Feature-pesign-support-SM2-signature-algorithm.patch index 30d9996..502e590 100644 --- a/pesign-support-SM2-signature-algorithm.patch +++ b/Feature-pesign-support-SM2-signature-algorithm.patch @@ -16,7 +16,7 @@ index afa00e2..4aabf5d 100644 return -1; } -+#if defined(CKM_SM2_WITH_SM3) ++#if defined(CKM_SM2_WITH_SM3) || defined(CKM_NSS_SM2_WITH_SM3) +static int sm2_sign(SECItem *sig, cms_context *cms, SECKEYPrivateKey *privkey, + SECItem *content, SECOidData *oid) +{ @@ -92,7 +92,7 @@ index afa00e2..4aabf5d 100644 memset (&tmp, '\0', sizeof (tmp)); SECStatus status; -+#if defined(CKM_SM2_WITH_SM3) ++#if defined(CKM_SM2_WITH_SM3) || defined(CKM_NSS_SM2_WITH_SM3) + if (oidt == SEC_OID_SM2_WITH_SM3) { + status = sm2_sign(&tmp, cms, privkey, sign_content, oid) ? + SECFailure : SECSuccess; diff --git a/pesign-support-SM3-digest-algorithm.patch b/Feature-pesign-support-SM3-digest-algorithm.patch similarity index 92% rename from pesign-support-SM3-digest-algorithm.patch rename to Feature-pesign-support-SM3-digest-algorithm.patch index 16ff281..dbfb020 100644 --- a/pesign-support-SM3-digest-algorithm.patch +++ b/Feature-pesign-support-SM3-digest-algorithm.patch @@ -15,7 +15,7 @@ index d13b2cb..7b6dc0e 100644 .size = 20 }, #endif -+#if defined(CKM_SM2_WITH_SM3) ++#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, diff --git a/pesign.spec b/pesign.spec index a468587..64b262d 100644 --- a/pesign.spec +++ b/pesign.spec @@ -2,7 +2,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 0.113 -Release: 6 +Release: 7 License: GPLv2 URL: https://github.com/vathpela/pesign Source0: https://github.com/rhboot/pesign/archive/113.tar.gz @@ -20,8 +20,8 @@ Patch0001: Fix-the-build-with-nss-3.44.patch Patch0002: remove-superfluous-type-settings.patch # Feature: support SM2 and SM3 -Patch9000: pesign-support-SM3-digest-algorithm.patch -Patch9001: pesign-support-SM2-signature-algorithm.patch +Patch9000: Feature-pesign-support-SM3-digest-algorithm.patch +Patch9001: Feature-pesign-support-SM2-signature-algorithm.patch %description pesign is a command line tool for manipulating signatures and @@ -98,6 +98,9 @@ exit 0 %{_mandir}/man*/* %changelog +* Mon Oct 31 2022 luhuaxin - 0.113-7 +- fix the algorithm flag for sm2,sm3 + * Mon Oct 10 2022 godcansee - 0.113-6 - add feature to support for sm2,sm3 -- Gitee