From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62380 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 12:00:22 +0100 Message-ID: <87lkv1whmh.fsf@latte.josefsson.org> References: <2cd46e7f0510031250u66ea1349yb437d539ce4027ef@mail.gmail.com> <2cd46e7f0510061541w73bb6a92wb6d22829b6e804ae@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> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1143111660 17741 80.91.229.2 (23 Mar 2006 11:01:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Mar 2006 11:01:00 +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 12:00:56 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 1FMNYc-0006oH-Vs for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 12:00:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMNYc-0005UB-Lu for ged-emacs-devel@m.gmane.org; Thu, 23 Mar 2006 06:00:46 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FMNYK-0005Tn-TP for emacs-devel@gnu.org; Thu, 23 Mar 2006 06:00:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FMNYK-0005Sp-31 for emacs-devel@gnu.org; Thu, 23 Mar 2006 06:00:28 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FMNYJ-0005Sc-Tn for emacs-devel@gnu.org; Thu, 23 Mar 2006 06:00:27 -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 1FMNYs-0001CI-Tf for emacs-devel@gnu.org; Thu, 23 Mar 2006 06:01:03 -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 k2NB0MCj021358; Thu, 23 Mar 2006 12:00:22 +0100 Original-To: Daiki Ueno OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:21:060323:wilde@sha-bang.de::J00wZYmRxQ81KYHY:2EN5 X-Hashcash: 1:21:060323:emacs-devel@gnu.org::uV6w4buGqpytNJWy:3Blf X-Hashcash: 1:21:060323:ueno@unixuser.org::m+R7d0aRUgudUD7H:4ecu X-Hashcash: 1:21:060323:ding@gnus.org::Z7ifh30MQNRULR7S:6O21 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:51996 gmane.emacs.gnus.general:62380 Archived-At: Daiki Ueno writes: Date: Thu, 23 Mar 2006 12:00:22 +0100 In-Reply-To: (Daiki Ueno's message of "Thu, 23 Mar 2006 19:40:08 +0900") Message-ID: <87mzfhwhmh.fsf@latte.josefsson.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable > Hello, > >>>>>> In =20 >>>>>> Daiki Ueno wrote: >> > Right now, pgg assume that gpg will need a passphrase so it asks the >> > user for one. It may be better if pgg postpone the passphrase query >> > until gpg tell pgg that it needs a passphrase. Then it is only >> > queried for when it is needed. This should be more reliable, but >> > slightly more complicated to implement (asynchronous code). > >> Anyway, I'll try to implement this. > > Could you please try the attached pgg-gpg.el? > > Please note, this patch is only for review, not meant to be committed now. It just hangs, it seems gpg is waiting for input from stdin or similar. I don't have time to debug further, sorry. Debugger entered--Lisp error: (quit) accept-process-output(# 1) (while (and (eq ... ...) pgg-gpg-pending-status-list) (accept-process-out= put process 1)) (save-current-buffer (set-buffer (process-buffer process)) (setq pgg-gpg-= pending-status-list status-list) (while (and ... pgg-gpg-pending-status-lis= t) (accept-process-output process 1))) (with-current-buffer (process-buffer process) (setq pgg-gpg-pending-statu= s-list status-list) (while (and ... pgg-gpg-pending-status-list) (accept-pr= ocess-output process 1))) pgg-gpg-wait-for-status(# ("GOOD_PASSPHRASE")) (let* ((pgg-gpg-user-id ...) (args ...) (process ...)) (pgg-gpg-wait-for-= status process (quote ...)) (process-send-region process start end) (proces= s-send-eof process) (pgg-gpg-wait-for-process process) (pgg-process-when-su= ccess)) pgg-gpg-sign-region(1 1790 nil nil) funcall(pgg-gpg-sign-region 1 1790 nil nil) apply(funcall pgg-gpg-sign-region (1 1790 nil nil)) pgg-invoke("sign-region" gpg 1 1790 nil nil) pgg-sign-region(1 1790) mml2015-pgg-sign((part (sign . "pgpmime") (tag-location . 1743) (contents= . "Daiki Ueno writes:\n\n> Hello,\n>\n>>>>>> In \n>>>>>> Daiki Ueno <= ueno@unixuser.org> wrote:\n>> > Right now, pgg assume that gpg will need a = passphrase so it asks the\n>> > user for one. It may be better if pgg post= pone the passphrase query\n>> > until gpg tell pgg that it needs a passphra= se. Then it is only\n>> > queried for when it is needed. This should be m= ore reliable, but\n>> > slightly more complicated to implement (asynchronou= s code).\n>\n>> Anyway, I'll try to implement this.\n>\n> Could you please = try the attached pgg-gpg.el?\n>\n> Please note, this patch is only for revi= ew, not meant to be committed now.\n\nIt just\n\ngpg: NOTE: signature key 5= C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 10184339= 46\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: NOTE: signa= ture key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRE= D 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: N= OTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:]= KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-inste= ad\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST= \n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexp= ired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06= 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-= use-keyexpired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 1= 0 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED d= eprecated-use-keyexpired-instead\ngpg: using subkey AABB1F7B instead of pri= mary key B565716F\ngpg: writing to `/tmp/pgg-output6523Lpl'\n"))) mml2015-sign((part (sign . "pgpmime") (tag-location . 1743) (contents . "= Daiki Ueno writes:\n\n> Hello,\n>\n>>>>>> In \n>>>>>> Daiki Ueno wrote:\n>> > Right now, pgg assume that gpg will need a pass= phrase so it asks the\n>> > user for one. It may be better if pgg postpone= the passphrase query\n>> > until gpg tell pgg that it needs a passphrase. = Then it is only\n>> > queried for when it is needed. This should be more = reliable, but\n>> > slightly more complicated to implement (asynchronous co= de).\n>\n>> Anyway, I'll try to implement this.\n>\n> Could you please try = the attached pgg-gpg.el?\n>\n> Please note, this patch is only for review, = not meant to be committed now.\n\nIt just\n\ngpg: NOTE: signature key 5C980= 097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n= [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: NOTE: signature= key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 10= 18433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: NOTE:= signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEY= EXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\n= gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[G= NUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired= -instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 200= 2 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-= keyexpired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12= :19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED depre= cated-use-keyexpired-instead\ngpg: using subkey AABB1F7B instead of primary= key B565716F\ngpg: writing to `/tmp/pgg-output6523Lpl'\n"))) mml-pgpmime-sign-buffer((part (sign . "pgpmime") (tag-location . 1743) (c= ontents . "Daiki Ueno writes:\n\n> Hello,\n>\n>>>>>> In= \n>>>>>> Daiki= Ueno wrote:\n>> > Right now, pgg assume that gpg will = need a passphrase so it asks the\n>> > user for one. It may be better if p= gg postpone the passphrase query\n>> > until gpg tell pgg that it needs a p= assphrase. Then it is only\n>> > queried for when it is needed. This shou= ld be more reliable, but\n>> > slightly more complicated to implement (asyn= chronous code).\n>\n>> Anyway, I'll try to implement this.\n>\n> Could you = please try the attached pgg-gpg.el?\n>\n> Please note, this patch is only f= or review, not meant to be committed now.\n\nIt just\n\ngpg: NOTE: signatur= e key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1= 018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: NOTE= : signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KE= YEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\= ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[= GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpire= d-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 20= 02 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use= -keyexpired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 1= 2:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED depr= ecated-use-keyexpired-instead\ngpg: NOTE: signature key 5C980097 expired We= d Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEX= PIRED deprecated-use-keyexpired-instead\ngpg: using subkey AABB1F7B instead= of primary key B565716F\ngpg: writing to `/tmp/pgg-output6523Lpl'\n"))) mml-generate-mime-1((part (sign . "pgpmime") (tag-location . 1743) (conte= nts . "Daiki Ueno writes:\n\n> Hello,\n>\n>>>>>> In \n>>>>>> Daiki Uen= o wrote:\n>> > Right now, pgg assume that gpg will need= a passphrase so it asks the\n>> > user for one. It may be better if pgg p= ostpone the passphrase query\n>> > until gpg tell pgg that it needs a passp= hrase. Then it is only\n>> > queried for when it is needed. This should b= e more reliable, but\n>> > slightly more complicated to implement (asynchro= nous code).\n>\n>> Anyway, I'll try to implement this.\n>\n> Could you plea= se try the attached pgg-gpg.el?\n>\n> Please note, this patch is only for r= eview, not meant to be committed now.\n\nIt just\n\ngpg: NOTE: signature ke= y 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 10184= 33946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg: NOTE: si= gnature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXP= IRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead\ngpg= : NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST\n[GNUP= G:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-keyexpired-in= stead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 C= EST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecated-use-key= expired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19= :06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRED deprecat= ed-use-keyexpired-instead\ngpg: NOTE: signature key 5C980097 expired Wed Ap= r 10 12:19:06 2002 CEST\n[GNUPG:] KEYEXPIRED 1018433946\n[GNUPG:] SIGEXPIRE= D deprecated-use-keyexpired-instead\ngpg: using subkey AABB1F7B instead of = primary key B565716F\ngpg: writing to `/tmp/pgg-output6523Lpl'\n"))) mml-generate-mime() message-encode-message-body() mml-to-mime() mml-preview((4)) call-interactively(mml-preview) 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 gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST [GNUPG:] KEYEXPIRED 1018433946 [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST [GNUPG:] KEYEXPIRED 1018433946 [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST [GNUPG:] KEYEXPIRED 1018433946 [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST [GNUPG:] KEYEXPIRED 1018433946 [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead gpg: NOTE: signature key 5C980097 expired Wed Apr 10 12:19:06 2002 CEST [GNUPG:] KEYEXPIRED 1018433946 [GNUPG:] SIGEXPIRED deprecated-use-keyexpired-instead gpg: using subkey AABB1F7B instead of primary key B565716F gpg: writing to `/tmp/pgg-output6523Lpl'