1
0
Fork 0

Loopback pinentry for GPG v2

master
Mike Gerwitz 2016-06-19 22:07:47 -04:00
parent c646b61044
commit 178f6af884
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 4 additions and 5 deletions

View File

@ -916,11 +916,10 @@ The GPG pinentry dialog is a neat console-based dialog that consumes the TTY
and prompts for a password. In general, this works well; with Emacs, I
noticed that it fights for input.
To avoid the problem, I disable pinentry indirectly by clearing out the
=GPG_AGENT_INFO= environment variable.
As long as =allow-loopback-pinentry= is set in =gpg-agent.conf=, =loopback=
can be set as the pinentry mode, which allows the caller to handle the
request. In our case, that means that the minibuffer will be used.
#+BEGIN_SRC emacs-lisp
(defadvice epg--start (around advice-epg-disable-agent activate)
(setenv "GPG_AGENT_INFO" nil)
ad-do-it)
(setq epa-pinentry-mode 'loopback)
#+END_SRC