On Sonntag, 8. Mai 2022 01:33:28 CEST Vinay Sajip via Gnupg-users wrote:
> The following script fails at the verification step. It needs to be run with
[...]
> echo $'\e[1;33m'Creating random data to sign ...$'\e[0m'
> dd if=/dev/urandom of=data-to-sign bs=1 count=1024 > /dev/null 2>&1
> echo $'\e[1;33m'Signing data, asking for a detached signature ...$'\e[0m'
> echo aable | ${GPG} --pinentry-mode loopback ${COMMON_ARGS} --passphrase-fd
> 0 -sa --detach-sign --default-key ${KEYID} | tee sig.asc command_status $?
> echo $'\e[1;33m'Trying to verify data ...$'\e[0m'
> ${GPG} ${COMMON_ARGS} --verify sig.asc data-to-sign
[...]

> What have I missed in terms of arguments passed to GnuPG, or anything else?

You have missed that you are not passing the file data-to-sign to gpg. I think 
what happens is that gpg signs the text "aable\n" (and it doesn't use "aable" 
for the passphrase because it's still in the cache after the generation of the 
test key).

Regards,
Ingo

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to