aboutsummaryrefslogtreecommitdiff
blob: 646798c8bbeb5da0e59f6b8ddbcea93288e2d07e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Don't enable pinentry loopback mode for gpgsm
Patch from master branch
https://debbugs.gnu.org/67012

commit e736a1b5a2aa2dd8dbaba32a408db70822fe434f
Author: Ulrich Müller <ulm@gentoo.org>
Date:   Fri Nov 17 12:16:54 2023 +0100

    Don't enable pinentry loopback mode for gpgsm

--- a/doc/misc/epa.texi
+++ b/doc/misc/epa.texi
@@ -640,6 +640,9 @@ GnuPG Pinentry
 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,
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -595,7 +595,12 @@ epg--start
 		       (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))))