[PATCH] gpg: Allow setting of temporary pinentry program

Daiki Ueno ueno at gnu.org
Fri May 22 09:50:30 CEST 2015

Werner Koch <wk at gnupg.org> writes:

> On Fri, 22 May 2015 05:42, ueno at gnu.org said:
>> Unfortunately, it is not an option for Emacs.  We want to use the custom
>> pinentry program only temporarily, and continue to use the default
>> pinentry program for other use-cases (e.g. calling gpg from
>> gnome-terminal).  This is currently not possible.
> To do this you can put a magic value into the PINENTRY_USER_DATA envvar
> and let your wrapper divert to your Pinentry if that magic value is
> detected.

The problem with this approach is that the wrapper doesn't know the
default pinentry.  gpgconf --list-options doesn't include the value,
right?  And even if it is possible, it will list the wrapper, instead of
the default one.

So, instead of implementing the diversion mechanism in wrapper, I would
rather suggest to add the diversion mechanism in gpg-agent.  E.g., allow
--pinentry-program to have multiple values, and try one by one until

Daiki Ueno

More information about the Gnupg-devel mailing list