forked from pool/pesign-obs-integration
fix the potential hash mismatching (bsc#1183747) OBS-URL: https://build.opensuse.org/request/show/880006 OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign-obs-integration?expand=0&rev=100
29 lines
900 B
Diff
29 lines
900 B
Diff
From 8177d2b826f848dd3feb4be28ed3c024d6cb7f43 Mon Sep 17 00:00:00 2001
|
|
From: Gary Lin <glin@suse.com>
|
|
Date: Fri, 19 Mar 2021 11:41:49 +0800
|
|
Subject: [PATCH] Always pad the EFI image when calculating the hash
|
|
|
|
Fix bsc#1183747
|
|
|
|
Signed-off-by: Gary Lin <glin@suse.com>
|
|
---
|
|
pesign-repackage.spec.in | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/pesign-repackage.spec.in b/pesign-repackage.spec.in
|
|
index 76732b5..ccb35af 100644
|
|
--- a/pesign-repackage.spec.in
|
|
+++ b/pesign-repackage.spec.in
|
|
@@ -139,7 +139,7 @@ for sig in "${sigs[@]}"; do
|
|
pesign -n "$nss_db" -c cert -i "$f" -o "$f.tmp" -d sha256 -I "${infile}.sattrs" -R "$sig"
|
|
rm -f "${infile}.sattrs"
|
|
mv "$f.tmp" "$f"
|
|
- nhash=$(pesign -n "$nss_db" -h -i "$f")
|
|
+ nhash=$(pesign -n "$nss_db" -h -P -i "$f")
|
|
if test "$ohash" != "$nhash" ; then
|
|
echo "hash mismatch error: $ohash $nhash"
|
|
exit 1
|
|
--
|
|
2.29.2
|
|
|