diff options
| author | Ulrich Müller | 2023-11-17 12:16:54 +0100 |
|---|---|---|
| committer | Ulrich Müller | 2023-11-25 11:53:25 +0100 |
| commit | e736a1b5a2aa2dd8dbaba32a408db70822fe434f (patch) | |
| tree | 45d1ee7a094bcdec1b786b16e585c66d7fe1265e | |
| parent | 9656fe03585077370b18c7ece2407e55df24a5fa (diff) | |
| download | emacs-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.texi | 3 | ||||
| -rw-r--r-- | lisp/epg.el | 7 |
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 | |||
| 640 | Emacs. | 640 | Emacs. |
| 641 | @end enumerate | 641 | @end enumerate |
| 642 | 642 | ||
| 643 | Note that loopback Pinentry does not work with @command{gpgsm}, | ||
| 644 | therefore EasyPG will ignore this setting for it. | ||
| 645 | |||
| 643 | There are other options available to use Emacs as Pinentry, you might | 646 | There are other options available to use Emacs as Pinentry, you might |
| 644 | come across a Pinentry called @command{pinentry-emacs} or | 647 | come 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)))) |