From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: Re: Documenting gpg-agent Date: Tue, 26 Dec 2006 10:01:45 +0900 Message-ID: <61d457d1-ee81-47bb-8cea-b49d840df05d@well-done.deisui.org> References: <2cd46e7f0612230904s7059393co2ed34a756775ee84@mail.gmail.com> <07267757-097d-4e9a-9189-d24d85b1786f@well-done.deisui.org> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1167094952 16174 80.91.229.10 (26 Dec 2006 01:02:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Dec 2006 01:02:32 +0000 (UTC) Cc: wilde@sha-bang.de, wk@gnupg.org, ken.manheimer@gmail.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 26 02:02:29 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gz0i1-0000S6-1j for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2006 02:02:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gz0i0-0001Bv-MT for ged-emacs-devel@m.gmane.org; Mon, 25 Dec 2006 20:02:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gz0hn-0001BC-67 for emacs-devel@gnu.org; Mon, 25 Dec 2006 20:02:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gz0hk-0001AS-Pn for emacs-devel@gnu.org; Mon, 25 Dec 2006 20:02:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gz0hk-0001AP-Mb for emacs-devel@gnu.org; Mon, 25 Dec 2006 20:02:08 -0500 Original-Received: from [210.231.96.69] (helo=well-done.deisui.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1Gz0hf-0004tg-Hl; Mon, 25 Dec 2006 20:02:04 -0500 Original-Received: from [150.82.173.223] (helo=well-done.deisui.org) by well-done.deisui.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Gz0hP-0004rE-06; Tue, 26 Dec 2006 10:01:47 +0900 Original-To: rms@gnu.org X-Attribution: DU Mail-Copies-To: poster In-Reply-To: (Richard Stallman's message of "Mon, 25 Dec 2006 11:53:14 -0500") 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:64275 Archived-At: >>>>> In >>>>> Richard Stallman wrote: > Since allout exploits the use of PGG's passphrase handling functions to > provide a custom passphrase handling, it's not a bug in PGG or gpg-agent, > I think. > I am not convinced of that. He says that PGG was ignoring the > passphrases that allout passes in. Why isn't that a bug? I'm sorry for that I misunderstood his explanation and the current gpg-agent support of PGG. I just looked at the code and found it actually has a bug. PGG checks whether to use a given passphrase or gpg-agent two times, for the first time a given passphrase wins, but for the second time gpg-agent wins. Here is a tiny patch to fix this. Sascha, can you check this? Index: lisp/pgg-gpg.el =================================================================== RCS file: /sources/emacs/emacs/lisp/pgg-gpg.el,v retrieving revision 1.19 diff -c -r1.19 pgg-gpg.el *** lisp/pgg-gpg.el 17 Dec 2006 23:18:36 -0000 1.19 --- lisp/pgg-gpg.el 26 Dec 2006 01:00:29 -0000 *************** *** 61,67 **** "GnuPG ID of your default identity.") (defun pgg-gpg-process-region (start end passphrase program args) ! (let* ((use-agent (pgg-gpg-use-agent-p)) (output-file-name (pgg-make-temp-file "pgg-output")) (args `("--status-fd" "2" --- 61,67 ---- "GnuPG ID of your default identity.") (defun pgg-gpg-process-region (start end passphrase program args) ! (let* ((use-agent (and (null passphrase) (pgg-gpg-use-agent-p))) (output-file-name (pgg-make-temp-file "pgg-output")) (args `("--status-fd" "2" -- Daiki Ueno