diff --git a/Fix-pesign-i-file-P-h-command-fail.patch b/Fix-pesign-i-file-P-h-command-fail.patch new file mode 100644 index 0000000000000000000000000000000000000000..f075740c753aeb97bbe49601b4717eb385a02cc2 --- /dev/null +++ b/Fix-pesign-i-file-P-h-command-fail.patch @@ -0,0 +1,28 @@ +From 96b18f8874d28db72d7021fd7a5bf1a13d1f7ff3 Mon Sep 17 00:00:00 2001 +From: jinlun +Date: Thu, 18 Jan 2024 21:38:49 +0800 +Subject: [PATCH] fix 'pesign -i file -P -h' command fail + +--- + src/cms_common.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/cms_common.h b/src/cms_common.h +index 73c596f..76a9ac0 100644 +--- a/src/cms_common.h ++++ b/src/cms_common.h +@@ -76,7 +76,11 @@ struct digest_param { + int size; + }; + ++#if defined(CKM_SM2_WITH_SM3) || defined(CKM_NSS_SM2_WITH_SM3) + extern const struct digest_param digest_params[3]; ++#else ++extern const struct digest_param digest_params[2]; ++#endif + extern const unsigned int n_digest_params; + + typedef struct pk12_file { +-- +2.33.0 + diff --git a/pesign.spec b/pesign.spec index 1bf462e590553c47bee0d2cee5b9851f5c18f798..fdc3e3029fa802e5defd531393f913ba9015d8e2 100644 --- a/pesign.spec +++ b/pesign.spec @@ -2,7 +2,7 @@ Name: pesign Summary: Signing utility for UEFI binaries Version: 116 -Release: 2 +Release: 3 License: GPLv2 URL: https://github.com/rhboot/pesign Source0: https://github.com/rhboot/pesign/archive/refs/tags/116.tar.gz @@ -22,7 +22,7 @@ Patch0002: 0001-cms_common-Fixed-Segmentation-fault.patch Patch9000: Feature-pesign-support-SM3-digest-algorithm.patch Patch9001: Feature-pesign-support-SM2-signature-algorithm.patch Patch9002: Fix-build-error-of-gcc-version-too-low.patch - +Patch9003: Fix-pesign-i-file-P-h-command-fail.patch %description pesign is a command line tool for manipulating signatures and cryptographic digests of UEFI applications. @@ -95,6 +95,9 @@ exit 0 %{_mandir}/man*/* %changelog +* Thu Jan 18 2024 jinlun - 116-3 +- fix command file + * Mon Sep 11 2023 jinlun - 116-2 - fix the algorithm flag for sm2,sm3