From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: Re: epg.el: epg--status-GET_LINE not working? Date: Wed, 05 Jul 2017 18:25:29 +0200 Message-ID: <87d19ec0li.fsf-ueno@gnu.org> References: <87fuenqlp8.fsf@mithlond.arda> <874lur5uia.fsf@mithlond.arda> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1499271988 7054 195.159.176.226 (5 Jul 2017 16:26:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 5 Jul 2017 16:26:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cc: "Neal H. Walfield" , emacs-devel@gnu.org To: Teemu Likonen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 05 18:26:22 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dSn87-0001S2-E3 for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2017 18:26:19 +0200 Original-Received: from localhost ([::1]:47070 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSn8C-0000ea-Rn for ged-emacs-devel@m.gmane.org; Wed, 05 Jul 2017 12:26:24 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSn7f-0000eQ-2e for emacs-devel@gnu.org; Wed, 05 Jul 2017 12:25:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSn7e-0005eH-7N for emacs-devel@gnu.org; Wed, 05 Jul 2017 12:25:51 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:36231) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSn7W-0005Ye-R1; Wed, 05 Jul 2017 12:25:42 -0400 Original-Received: from du-a.org ([219.94.251.20]:57876 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dSn7V-00056F-FW; Wed, 05 Jul 2017 12:25:42 -0400 In-Reply-To: <874lur5uia.fsf@mithlond.arda> (Teemu Likonen's message of "Wed, 05 Jul 2017 08:21:17 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:216184 Archived-At: --=-=-= Content-Type: text/plain Teemu Likonen 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. Regards, -- Daiki Ueno --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=epg.el.diff 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 inhibit-quit) (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"))) (quit (epg-context-set-result-for context 'error --=-=-=--