[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: epg.el: epg--status-GET_LINE not working?

From: Daiki Ueno
Subject: Re: epg.el: epg--status-GET_LINE not working?
Date: Wed, 05 Jul 2017 18:25:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Teemu Likonen <address@hidden> writes:

> I suggest a minimal handler so that epg wouldn't wait GET_LINE input in
> tofu conflicts (which currently doesn't work anyway) and
> epg-signature-to-string function would return a string like this:
>     Good signature from [keyid] [user id] (tofu conflict) created at
>     [date] using [algorithm]
> I believe epg is mostly used with Gnus and that line alone is useful.

Would that work?  I mean, if there is an unresolved tofu conflict,
shouldn't signature verification fail?

Anyway, I would rather ignore "tofu.conflict" like the attached patch
(not tested), until it becomes really useful.

Daiki Ueno
diff --git a/lisp/epg.el b/lisp/epg.el
index 1e24b8d..4eb51ef 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -163,6 +163,8 @@ epg-dn-type-alist
 (defvar epg-prompt-alist nil)
+(defvar epg-unsupported-prompt-list '("tofu.conflict"))
 (define-error 'epg-error "GPG error")
 (cl-defstruct (epg-data
@@ -910,11 +912,13 @@ epg--status-GET_LINE
     (condition-case nil
        (process-send-string (epg-context-process context)
-                            (concat (read-string
-                                     (if entry
-                                         (cdr entry)
-                                       (concat string ": ")))
-                                    "\n"))
+                             (if (member string epg-unsupported-prompt-list)
+                                 "\n"
+                               (concat (read-string
+                                        (if entry
+                                            (cdr entry)
+                                          (concat string ": ")))
+                                       "\n")))
        context 'error

reply via email to

[Prev in Thread] Current Thread [Next in Thread]