void-packages/srcpkgs/sbsigntool/patches/Align-signature-data-to-8-b...

27 lines
975 B
Diff

From 8b6b7a9904881757254b92a928b95dfb8634605b Mon Sep 17 00:00:00 2001
From: Steve Langasek <steve.langasek@canonical.com>
Date: Fri, 12 Oct 2012 16:27:13 -0700
Subject: [PATCH] Align signature data to 8 bytes
Before appending the signature data to our binary, pad the file out to
8-byte alignment. This matches the Microsoft signing implementation, which
enables us to use sbattach to verify the integrity of the binaries returned
by the SysDev signing service.
---
src/image.c | 2 ++
1 file changed, 2 insertions(+)
Index: sbsigntool/src/image.c
===================================================================
--- sbsigntool.orig/src/image.c
+++ sbsigntool/src/image.c
@@ -495,6 +495,8 @@ reparse:
* we've calculated during the pecoff parsing, so we need to redo that
* too.
*/
+ image->data_size = align_up(image->data_size, 8);
+
if (image->data_size > image->size) {
image->buf = talloc_realloc(image, image->buf, uint8_t,
image->data_size);