From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Small patch to enable use of gpg-agent with pgg Date: Sun, 26 Mar 2006 19:05:03 +0200 Message-ID: <87slp587cw.fsf@latte.josefsson.org> References: <2cd46e7f0510031250u66ea1349yb437d539ce4027ef@mail.gmail.com> <2cd46e7f0510101415t76825ea7u9749fe23da54ce@mail.gmail.com> <2cd46e7f0510121647x3c51fb65pc883ed61f4e864ab@mail.gmail.com> <2cd46e7f0510200708x4640d1c2t50743cf439e52dd4@mail.gmail.com> <87pskfq361.fsf@latte.josefsson.org> <877j6mg2af.fsf@latte.josefsson.org> <87lkv1whmh.fsf@latte.josefsson.org> <897751e5-a148-4109-8da6-6f69cce0dec0@well-done.deisui.org> <87d5gd2ts1.fsf@latte.josefsson.org> <87wteiypvv.fsf@latte.josefsson.org> <87irq1evdk.fsf@catnip.gol.com> <0443f268-1caf-4aef-9a06-daa4a59b0682@well-done.deisui.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143392753 838 80.91.229.2 (26 Mar 2006 17:05:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Mar 2006 17:05:53 +0000 (UTC) Cc: Miles Bader , ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 26 19:05:52 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FNYgY-00078n-Jh for ged-emacs-devel@m.gmane.org; Sun, 26 Mar 2006 19:05:50 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FNYgX-0001ci-UJ for ged-emacs-devel@m.gmane.org; Sun, 26 Mar 2006 12:05:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FNYg4-0001bd-2D for emacs-devel@gnu.org; Sun, 26 Mar 2006 12:05:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FNYfx-0001Yw-Jw for emacs-devel@gnu.org; Sun, 26 Mar 2006 12:05:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FNYfx-0001Yk-AH for emacs-devel@gnu.org; Sun, 26 Mar 2006 12:05:13 -0500 Original-Received: from [217.13.230.178] (helo=yxa.extundo.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FNYhF-0002MN-8r; Sun, 26 Mar 2006 12:06:33 -0500 Original-Received: from localhost.localdomain (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k2QH53fX004357; Sun, 26 Mar 2006 19:05:03 +0200 Original-To: Daiki Ueno OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060326:emacs-devel@gnu.org::T1BF+rz1DOYIYSkY:Y8J X-Hashcash: 1:21:060326:miles@gnu.org::nDYA3NzajQeVvY4P:0Ama X-Hashcash: 1:21:060326:ding@gnus.org::LURS/Mnz87xcZcqD:2eN6 X-Hashcash: 1:21:060326:ueno@unixuser.org::670AfGtytV0be8e1:50Ps In-Reply-To: <0443f268-1caf-4aef-9a06-daa4a59b0682@well-done.deisui.org> (Daiki Ueno's message of "Sun, 26 Mar 2006 14:06:02 +0900") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on yxa.extundo.com X-Virus-Status: Clean X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52072 gmane.emacs.gnus.general:62408 Archived-At: Daiki Ueno writes: >>>>>> In <87irq1evdk.fsf@catnip.gol.com> >>>>>> Miles Bader wrote: >> Simon Josefsson writes: >> > What do you think? It might be ugly to depend on the 'gpg: writing' >> > output instead of the [GNUPG:] stuff, but I see no option here. > >> Of course if such a kludge is used, an important thing is to report the >> problem with the "official" interface as a bug... > > Yes. I think the root of the problem is that gpg does not emit any > trigger of signature creation. I'll propose a patch to GnuPG so as to > introduce BEGIN_SIGNING and END_SIGNING status. That sounds like a good idea. > For the meantime, how about using pgg-gpg-use-agent as a flag to > indicate that GnuPG will _not_ ask a passphrase in signing? Smartcard > users should have to set pgg-gpg-use-agent explicitly though. This patch now works fine for me, both smart card and non-smartcard. Has anyone else tested it? Should we install it? I think so, so unless there are objections within a few days, I'll install it on v5-10 and Emacs CVS. Ok, Reinar? We could also wait until after the new v5-10 release, this is a pretty large change. There is another nit (I'll fix this once your code has been installed), which was present earlier too: specifying a --local-user parameter even when the Gnus user didn't customize pgg-gpg-user-id seem wrong -- it will override a 'default-key' in the gpg.conf, and thus the default behaviour of PGG is different from the default behaviour of gpg. In my case, I have a default-key of b565716f (local secret key on disk) but PGG specify --local-user jas which make gpg select my smart card key instead, and signing in Gnus doesn't work unless I toggle pgg-gpg-use-agent. The solution is to only specify --local-user when the PGG user customized the user name to sign with.