From: npostavs@users.sourceforge.net
To: Glenn Morris <rgm@gnu.org>
Cc: 23619@debbugs.gnu.org, ueno@gnu.org
Subject: bug#23619: Some epg tests fail
Date: Sun, 19 Feb 2017 10:58:08 -0500 [thread overview]
Message-ID: <878tp2jhpr.fsf@users.sourceforge.net> (raw)
In-Reply-To: <ybiny2ul63.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 25 May 2016 13:01:08 -0400")
[-- Attachment #1: Type: text/plain, Size: 577 bytes --]
tags 23619 patch
quit
Glenn Morris <rgm@gnu.org> writes:
> Two epg tests fail for me on RHEL 7.2 with current master (and have done
> since they stopped being skipped).
>
> gpg --version
> gpg (GnuPG) 2.0.22
> libgcrypt 1.5.3
> 2 unexpected results:
> FAILED epg-decrypt-1
> FAILED epg-roundtrip-1
I have
gpg --version
gpg (GnuPG) 2.1.18
libgcrypt 1.7.6
These tests popup a dialog box to enter a passphrase before failing.
The following patch which sets pinentry mode to 'loopback' fixes it for
me (I have not tested with other gpg versions though):
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1507 bytes --]
From 1414b5b5f7c52215c0b7b5aaac2b657b69802ee4 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 19 Feb 2017 10:34:50 -0500
Subject: [PATCH v1] Fix passphrase callback with gpg 2.x (Bug#23619)
* lisp/epg.el (epg-context-set-passphrase-callback): Set CONTEXT's
pinentry mode to `loopback'.
---
lisp/epg.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/lisp/epg.el b/lisp/epg.el
index 587271b000..6b4accf1fe 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -246,16 +246,15 @@ epg-context-set-passphrase-callback
The function gets three arguments: the context, the key-id in
question, and the callback data (if any).
-The callback may not be called if you use GnuPG 2.x, which relies
-on the external program called `gpg-agent' for passphrase query.
-If you really want to intercept passphrase query, consider
-installing GnuPG 1.x _along with_ GnuPG 2.x, which does passphrase
-query by itself and Emacs can intercept them."
+Also set CONTEXT's pinentry mode to `loopback' (when using GnuPG
+2.x, the callback would not be called otherwise)."
;; (declare (obsolete setf "25.1"))
(setf (epg-context-passphrase-callback context)
(if (functionp passphrase-callback)
(list passphrase-callback)
- passphrase-callback)))
+ passphrase-callback))
+ (when passphrase-callback
+ (setf (epg-context-pinentry-mode context) 'loopback)))
(defun epg-context-set-progress-callback (context
progress-callback)
--
2.11.1
next prev parent reply other threads:[~2017-02-19 15:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 17:01 bug#23619: Some epg tests fail Glenn Morris
2017-02-19 15:58 ` npostavs [this message]
2017-02-19 18:34 ` Daiki Ueno
2017-02-19 20:35 ` npostavs
2017-02-20 8:39 ` Daiki Ueno
2017-02-20 16:04 ` npostavs
2017-02-20 16:15 ` Daiki Ueno
2017-02-20 18:16 ` npostavs
2017-02-21 10:43 ` Daiki Ueno
2017-02-22 2:05 ` npostavs
2017-02-24 9:25 ` Daiki Ueno
2017-03-01 1:01 ` npostavs
2017-03-01 23:47 ` Glenn Morris
2017-03-02 0:17 ` npostavs
2017-03-03 17:57 ` Glenn Morris
2017-03-03 18:37 ` Glenn Morris
2017-03-04 4:53 ` npostavs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878tp2jhpr.fsf@users.sourceforge.net \
--to=npostavs@users.sourceforge.net \
--cc=23619@debbugs.gnu.org \
--cc=rgm@gnu.org \
--cc=ueno@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).