[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master e736a1b5a2a: Don't enable pinentry loopback mode for gpgsm
From: |
Ulrich Müller |
Subject: |
master e736a1b5a2a: Don't enable pinentry loopback mode for gpgsm |
Date: |
Sat, 25 Nov 2023 05:53:37 -0500 (EST) |
branch: master
commit e736a1b5a2aa2dd8dbaba32a408db70822fe434f
Author: Ulrich Müller <ulm@gentoo.org>
Commit: Ulrich Müller <ulm@gentoo.org>
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.
---
doc/misc/epa.texi | 3 +++
lisp/epg.el | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
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
Emacs.
@end enumerate
+Note that loopback Pinentry does not work with @command{gpgsm},
+therefore EasyPG will ignore this setting for it.
+
There are other options available to use Emacs as Pinentry, you might
come across a Pinentry called @command{pinentry-emacs} or
@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)."
(if (epg-context-textmode context) '("--textmode"))
(if (epg-context-output-file context)
(list "--output" (epg-context-output-file context)))
- (if (epg-context-pinentry-mode context)
+ (if (and (epg-context-pinentry-mode context)
+ (not
+ ;; loopback doesn't work with gpgsm
+ (and (eq (epg-context-protocol context) 'CMS)
+ (eq (epg-context-pinentry-mode context)
+ 'loopback))))
(list "--pinentry-mode"
(symbol-name (epg-context-pinentry-mode
context))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master e736a1b5a2a: Don't enable pinentry loopback mode for gpgsm,
Ulrich Müller <=