Using loopback pin entry with GnuPG 2.1

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Oct 20 18:56:23 CEST 2016


I'm having trouble trying to get loopback pinentry working from my unit tests.

Environment: Ubuntu 16.04 (64-bit), GnuPG 2.1.11/libgcrypt 1.6.5

$ cat ~/.gnupg/gpg-agent.conf 
allow-loopback-pinentry


After creating this file, I logged out and logged in again. When I run


gpg2 --pinentry-mode loopback --status-fd 2 --no-tty --homedir /home/vinay/projects/python-gnupg/keys --batch --passphrase-fd 0 --debug-quick-random --decrypt


from a test script, I get errors (the first line is just for context):

[GNUPG:] ENC_TO BCB77EF0C7648FEB 16 0
gpg: setting pinentry mode 'loopback' failed: Not supported
[GNUPG:] ERROR set_pinentry_mode 67108924


I checked the gpg-agent process:

$ ps -ef | grep gpg-agent | grep -v grep
vinay    21402 21284  0 17:37 ?        00:00:00 gpg-agent --homedir /home/vinay/.gnupg --use-standard-socket --daemon

I can't find any reference to the error code 67108924, nor can I see what I've done wrong in the setup. Can anyone enlighten me as to how to get my tests to run all the way through without popping up pinentry prompts or failing as above?

Thanks and regards,

Vinay Sajip



More information about the Gnupg-devel mailing list