summaryrefslogtreecommitdiff
path: root/lisp/epg.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-08-02 11:32:35 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-02 11:32:35 +0200
commit929e7e141c5780e51173fda7d7fc5b73411e4465 (patch)
tree79f0235efd0988bc4ab238c9d4afbe886068c3bb /lisp/epg.el
parent6f94c2405f4c82b63da19de89549aff1fad7e594 (diff)
downloademacs-929e7e141c5780e51173fda7d7fc5b73411e4465.tar.gz
Signal an error in the user clicks "cancel" when signing in epg
* lisp/epg.el (epg-sign-string): If the user clicks "cancel" on the pinentry, then we don't have an error from gpg(sm), but instead nothing (bug#39058). Signal an error in that case.
Diffstat (limited to 'lisp/epg.el')
-rw-r--r--lisp/epg.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/epg.el b/lisp/epg.el
index 222fd913e17..5b90bc290ab 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1683,7 +1683,8 @@ Otherwise, it makes a cleartext signature."
(if (epg-context-result-for context 'error)
(let ((errors (epg-context-result-for context 'error)))
(signal 'epg-error
- (list "Sign failed" (epg-errors-to-string errors))))))
+ (list "Sign failed" (epg-errors-to-string errors))))
+ (signal 'epg-error '("Signing failed (unknown reason)"))))
(epg-read-output context))
(epg-delete-output-file context)
(if input-file