diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:59:16 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:59:16 +0000 |
commit | abd376d1e24e6665ef3662eb23ad76adadf78f72 (patch) | |
tree | ec7213f75b7e8c9cdbb4d335ed9ca7c11aae6f5f /debian/tests/gpgv-win32 | |
parent | Adding upstream version 2.2.27. (diff) | |
download | gnupg2-abd376d1e24e6665ef3662eb23ad76adadf78f72.tar.xz gnupg2-abd376d1e24e6665ef3662eb23ad76adadf78f72.zip |
Adding debian version 2.2.27-2+deb11u2.debian/2.2.27-2+deb11u2debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/tests/gpgv-win32')
-rwxr-xr-x | debian/tests/gpgv-win32 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/tests/gpgv-win32 b/debian/tests/gpgv-win32 new file mode 100755 index 0000000..035c060 --- /dev/null +++ b/debian/tests/gpgv-win32 @@ -0,0 +1,34 @@ +#!/bin/bash + +set -e + +export GNUPGHOME=$(mktemp -d) +gpgargs=(--batch --quiet --pinentry-mode=loopback --passphrase '' --with-colons) + +# Generate a minimal signing key: +gpg "${gpgargs[@]}" --quick-gen-key 'Test key for gpgv-win32 <test-key@example.com>' + +gpg "${gpgargs[@]}" -o "$GNUPGHOME/key.gpg" --export test-key@example.com + +# Sign this very script +rm -f "${0}.gpg" +gpg "${gpgargs[@]}" --output "${0}.gpg" --detach-sign "${0}" + +# Verify using gpgv +gpgv --quiet --status-fd 3 3> native.status --keyring "$GNUPGHOME/key.gpg" "${0}.gpg" "${0}" + +WINE=/usr/lib/wine/wine +export WINESERVER=/usr/lib/wine/wineserver32 + +# Verify using gpgv.exe (using --status-fd 1 because i don't know how +# to pass a non-standard file descriptor into wine) +"$WINE" /usr/share/win32/gpgv.exe --quiet --status-fd 1 > win32.status --keyring "Z://${GNUPGHOME}/key.gpg" "${0}.gpg" "${0}" + +# convert to unix newlines if necessary: +sed -i 's/\r$//' win32.status + +diff -u native.status win32.status + +head -v win32.status + +rm -rf "$GNUPGHOME" |