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: Thu, 23 Mar 2006 14:08:14 +0100 Message-ID: <87d5gd2ts1.fsf@latte.josefsson.org> References: <2cd46e7f0510031250u66ea1349yb437d539ce4027ef@mail.gmail.com> <20051007100014.GB4850@kenny.sha-bang.local> <2cd46e7f0510071106k3d4d3e6agc36f16a37d8b6bc6@mail.gmail.com> <20051007214952.GA30235@kenny.sha-bang.local> <20051008103627.GA1218@kenny.sha-bang.local> <2cd46e7f0510081131h14e2bbeaga7f1a33ebd6347c8@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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1143119378 12301 80.91.229.2 (23 Mar 2006 13:09:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2006 13:09:38 +0000 (UTC) Cc: Sascha Wilde , ding@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 23 14:09:32 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 1FMPZ1-0003bc-M3 for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 14:09:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMPZ1-0004WP-1N for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 08:09:19 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FMPYD-0004SI-1R for emacs-devel@gnu.org; Thu, 23 Mar 2006 08:08:30 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FMPY8-0004Pb-My for emacs-devel@gnu.org; Thu, 23 Mar 2006 08:08:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMPY8-0004PY-H2 for emacs-devel@gnu.org; Thu, 23 Mar 2006 08:08:24 -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 1FMPYi-0004uD-TF for emacs-devel@gnu.org; Thu, 23 Mar 2006 08:09:01 -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 k2ND8EDw004386; Thu, 23 Mar 2006 14:08:15 +0100 Original-To: Daiki Ueno OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060323:ueno@unixuser.org::BWthc1NkxBqcpK4c:Fls X-Hashcash: 1:21:060323:emacs-devel@gnu.org::PcG49KdpKJ2KFyos:0/yl X-Hashcash: 1:21:060323:ding@gnus.org::shoI1cxLZCIeF68W:7hOL X-Hashcash: 1:21:060323:wilde@sha-bang.de::MbEBR6y8sghF3Nw6:7Z9E In-Reply-To: <897751e5-a148-4109-8da6-6f69cce0dec0@well-done.deisui.org> (Daiki Ueno's message of "Thu, 23 Mar 2006 21:18:45 +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:52007 gmane.emacs.gnus.general:62390 Archived-At: Daiki Ueno writes: > $ gpg --version > gpg (GnuPG) 1.4.2.2 > $ gpg-agent --version > gpg-agent (GnuPG) 1.9.20 Same here, from Debian testing. >> The *pgg-gpg-debug* buffer contains: > >> gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST >> [GNUPG:] KEYEXPIRED 1018433946 >> [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead > > The *pgg-gpg-debug* buffer looks like this: > > [GNUPG:] USERID_HINT A5B6B2D4B15813FE Daiki Ueno > [GNUPG:] NEED_PASSPHRASE A5B6B2D4B15813FE A5B6B2D4B15813FE 17 0 > [GNUPG:] GET_HIDDEN passphrase.enter > [GNUPG:] GOT_IT > [GNUPG:] GOOD_PASSPHRASE > gpg: writing to `/tmp/pgg-output11169j3s' > gpg: DSA/SHA1 signature from: "B15813FE Daiki Ueno " > [GNUPG:] SIG_CREATED D 17 2 00 1143115847 80037CD00F1A940003CA50AAA5B6B2D4B15813FE Ok, I got your file to work for two cases: 1) gpg-agent with normal secret key 2) no gpg-agent with normal secret key but not with 3) gpg-agent with secret on smart card With the stuff in CVS, all three work, but I have to toggle pgg-gpg-use-agent manually. Your code has a better query too (since it know which key gpg actually wants), and it may improve passphrase caching too. Very nice! Maybe you can finish this code, and I can debug why it doesn't work for a smartcard separately. It is probably not an important feature.