File pesign-obs-integration-bsc1183747-always-pad-efi-images.patch of Package pesign-obs-integration.20743

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

openSUSE Build Service is sponsored by