diff options
-rwxr-xr-x | tools/gpg-authcode-sign.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/gpg-authcode-sign.sh b/tools/gpg-authcode-sign.sh index 14147c081..35a0f3827 100755 --- a/tools/gpg-authcode-sign.sh +++ b/tools/gpg-authcode-sign.sh @@ -215,6 +215,10 @@ if [ -n "$dryrun" ]; then echo >&2 "$PGM: would sign: '$inname' to '$outname'" +elif [ $(wc -c < "$inname" ) -lt 256 ]; then + + echo >&2 "$PGM: skipping '$inname' which is too short" + elif [ -n "$AUTHENTICODE_SIGNHOST" ]; then echo >&2 "$PGM: Signing via host $AUTHENTICODE_SIGNHOST" @@ -233,6 +237,12 @@ elif [ "$AUTHENTICODE_KEY" = card ]; then echo >&2 "$PGM: Signing using a card: '$inname'" + if echo "$inname" | egrep 'dll-e?x$' >/dev/null ; then + # osslsignecode does not like *.dll-x and *.dll-ex + cp "$inname" "$inname.tmp.dll" + inname="$inname.tmp.dll" + fi + while ! "$OSSLSIGNCODE" sign \ -pkcs11engine "$OSSLPKCS11ENGINE" \ -pkcs11module "$SCUTEMODULE" \ @@ -253,6 +263,7 @@ elif [ "$AUTHENTICODE_KEY" = card ]; then sleep $waittime waittime=$(( $waittime * 2 )) done + [ -f "$inname.tmp.dll" ] && rm "$inname.tmp.dll" rm "$outname.tmp.log" cp "$outname.tmp" "$outname" rm "$outname.tmp" |