mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
tools: Some tweaks to gpg-authcode-sign.sh
* tools/gpg-authcode-sign.sh: Skip too short files and rename certain files to ".dll". -- osslsigncode requires file suffixes of exe or dll but not dll-x or dll-ex which we use in our gpg4win build system. This adds workarounds for this and for short dummy files.
This commit is contained in:
parent
cbc7fa0c8e
commit
5ac8446ca8
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user