Pinentry-mode

Daiki Ueno ueno at gnu.org
Mon Apr 1 06:04:14 CEST 2013


Hi,

Werner Koch <wk at gnupg.org> writes:

> I hope that this feature will make it easier to use GnuPG 2.1 on
> non-desktop machines.  I have only tested decryption and signing and
> thus other parts may not yet work. 

Thanks for implementing this.  It looks useful for epg.el.

However, gpg2 seems to write nothing to --status-fd if it is connected
to a pipe:

 $ gpg2 --command-fd 0 --status-fd 1 --pinentry-mode loopback \
        --symmetric /dev/null | cat
 gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
 gpg: It is only intended for test purposes and should NOT be
 gpg: used in a production environment or with production keys!
 (no further output)

while it does without "cat":

 $ gpg2 --command-fd 0 --status-fd 1 --pinentry-mode loopback \
        --symmetric /dev/null     
 gpg: NOTE: THIS IS A DEVELOPMENT VERSION!
 gpg: It is only intended for test purposes and should NOT be
 gpg: used in a production environment or with production keys!
 [GNUPG:] NEED_PASSPHRASE_SYM 3 3 2
 [GNUPG:] GET_HIDDEN passphrase.enter

Do you have any idea on this?  Since epg.el waits for "GET_HIDDEN" sent
over a pipe, currently it stalls if "--pinentry-mode loopback" is
supplied.  FWIW, I'm attaching a patch to epg.el to support
pinentry-mode.  Here is a test case:

 (setq epg-debug t)
 (setq epg-gpg-program "gpg2")

 (setq context (epg-make-context 'OpenPGP))
 (epg-context-set-pinentry-mode context 'loopback)
 (epg-encrypt-file context "README" nil nil)

Regards,
-- 
Daiki Ueno
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epg-pinentry-loopback.patch
Type: text/x-patch
Size: 1976 bytes
Desc: not available
URL: </pipermail/attachments/20130401/113e8258/attachment-0001.bin>


More information about the Gnupg-devel mailing list