aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Müller2023-11-17 12:16:54 +0100
committerUlrich Müller2023-11-25 11:53:25 +0100
commite736a1b5a2aa2dd8dbaba32a408db70822fe434f (patch)
tree45d1ee7a094bcdec1b786b16e585c66d7fe1265e
parent9656fe03585077370b18c7ece2407e55df24a5fa (diff)
downloademacs-e736a1b5a2aa2dd8dbaba32a408db70822fe434f.tar.gz
emacs-e736a1b5a2aa2dd8dbaba32a408db70822fe434f.zip
Don't enable pinentry loopback mode for gpgsm
* lisp/epg.el (epg--start): Passphrase entry through the minibuffer is currently not supported with gpgsm, therefore don't pass "--pinentry-mode loopback" as an argument when the protocol is CMS. (Bug#67012) * doc/misc/epa.texi (GnuPG Pinentry): Document it.
-rw-r--r--doc/misc/epa.texi3
-rw-r--r--lisp/epg.el7
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi
index 917fd588593..1aeaef8990f 100644
--- a/doc/misc/epa.texi
+++ b/doc/misc/epa.texi
@@ -640,6 +640,9 @@ Customize variable @code{epg-pinentry-mode} to @code{loopback} in
640Emacs. 640Emacs.
641@end enumerate 641@end enumerate
642 642
643Note that loopback Pinentry does not work with @command{gpgsm},
644therefore EasyPG will ignore this setting for it.
645
643There are other options available to use Emacs as Pinentry, you might 646There are other options available to use Emacs as Pinentry, you might
644come across a Pinentry called @command{pinentry-emacs} or 647come across a Pinentry called @command{pinentry-emacs} or
645@command{gpg-agent} option @code{allow-emacs-pinentry}. However, 648@command{gpg-agent} option @code{allow-emacs-pinentry}. However,
diff --git a/lisp/epg.el b/lisp/epg.el
index aae9b9444b4..b994c1b9ca2 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -595,7 +595,12 @@ callback data (if any)."
595 (if (epg-context-textmode context) '("--textmode")) 595 (if (epg-context-textmode context) '("--textmode"))
596 (if (epg-context-output-file context) 596 (if (epg-context-output-file context)
597 (list "--output" (epg-context-output-file context))) 597 (list "--output" (epg-context-output-file context)))
598 (if (epg-context-pinentry-mode context) 598 (if (and (epg-context-pinentry-mode context)
599 (not
600 ;; loopback doesn't work with gpgsm
601 (and (eq (epg-context-protocol context) 'CMS)
602 (eq (epg-context-pinentry-mode context)
603 'loopback))))
599 (list "--pinentry-mode" 604 (list "--pinentry-mode"
600 (symbol-name (epg-context-pinentry-mode 605 (symbol-name (epg-context-pinentry-mode
601 context)))) 606 context))))