From 3adf11f3a3db62db8f191f40a76c9da8da8dc19a7662d9b14bab34cae5bff29a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Tue, 12 Feb 2013 16:03:26 +0000 Subject: [PATCH] fix signing OBS-URL: https://build.opensuse.org/package/show/Base:System/pesign?expand=0&rev=7 --- pesign-no-set-image-size.patch | 12 ++++++++++++ pesign.changes | 6 ++++++ pesign.spec | 2 ++ 3 files changed, 20 insertions(+) create mode 100644 pesign-no-set-image-size.patch diff --git a/pesign-no-set-image-size.patch b/pesign-no-set-image-size.patch new file mode 100644 index 0000000..0de8650 --- /dev/null +++ b/pesign-no-set-image-size.patch @@ -0,0 +1,12 @@ +--- a/libdpe/pe_addcert.c 2013-02-12 14:30:49.000000000 +0000 ++++ b/libdpe/pe_addcert.c 2013-02-12 14:30:55.000000000 +0000 +@@ -61,7 +61,9 @@ pe_alloccert(Pe *pe, size_t size) + dd->certs.virtual_address = compute_file_addr(pe, addr); + dd->certs.size = size; + ++#if 0 + pe_set_image_size(pe); ++#endif + + return 0; + } diff --git a/pesign.changes b/pesign.changes index 33a7224..cc993cf 100644 --- a/pesign.changes +++ b/pesign.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 12 15:32:11 CET 2013 - mls@suse.de + +- do not try to recalculate the image size, it is included in the + hash and therefore must not change. + ------------------------------------------------------------------- Wed Feb 6 10:44:48 UTC 2013 - glin@suse.com diff --git a/pesign.spec b/pesign.spec index cde4287..180fdfa 100644 --- a/pesign.spec +++ b/pesign.spec @@ -42,6 +42,7 @@ Patch7: pesign-bnc801653-teardown-segfault.patch Patch9: pesign-fix-export-attributes.patch # PATCH-FIX-UPSTREAM pesign-privkey_unneeded.diff glin@suse.com -- Don't check the private key when importing the raw signature Patch10: pesign-privkey_unneeded.diff +Patch11: pesign-no-set-image-size.patch BuildRequires: mozilla-nss-devel BuildRequires: pkg-config BuildRequires: popt-devel @@ -76,6 +77,7 @@ Authors: %patch7 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %build make OPTFLAGS="$RPM_OPT_FLAGS"