summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/sign-file5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/sign-file b/scripts/sign-file
index 095a953bdb8e..d014abd11f1c 100644
--- a/scripts/sign-file
+++ b/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