From d0a74b03ec1f206dd17b28a5507eb4e70a863612 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 19 Oct 2012 12:43:19 -0700 Subject: [PATCH] --- yaml --- r: 334578 b: refs/heads/master c: b05e585d4964cf0a70573d29113a1236ced98abf h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/scripts/sign-file | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b112ff09bfe0..9fd89014c938 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 16757372ffa5ee0ef7e82f73a6adbb054a434a13 +refs/heads/master: b05e585d4964cf0a70573d29113a1236ced98abf diff --git a/trunk/scripts/sign-file b/trunk/scripts/sign-file index 095a953bdb8e..d014abd11f1c 100644 --- a/trunk/scripts/sign-file +++ b/trunk/scripts/sign-file @@ -81,11 +81,12 @@ openssl dgst $dgst -binary $mod || exit $? # the signature with no metadata attached. # openssl rsautl -sign -inkey $key -keyform PEM -in $mod.dig -out $mod.sig || exit $? +siglen=`stat -c %s $mod.sig` SIGNER="`perl $keyid_script $x509 signer-name`" KEYID="`perl $keyid_script $x509 keyid`" -keyidlen=${#KEYID} -siglen=${#SIGNER} +keyidlen=$(echo -n "$KEYID" | wc -c) +signerlen=$(echo -n "$SIGNER" | wc -c) # # Build the signed binary