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: [andreas@altroot.de: keys are sometimes not removed from pgg's password cache] Date: Mon, 24 Jul 2006 10:23:06 +0900 Message-ID: <21c510ed-af5c-448b-bf1f-4cb124ae7fbf@well-done.deisui.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1153704223 1908 80.91.229.2 (24 Jul 2006 01:23:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Jul 2006 01:23:43 +0000 (UTC) Cc: davidsmith@acm.org, rms@gnu.org, andreas@altroot.de Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 24 03:23:40 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 1G4pAa-0005wF-62 for ged-emacs-devel@m.gmane.org; Mon, 24 Jul 2006 03:23:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4pAZ-0006JF-LT for ged-emacs-devel@m.gmane.org; Sun, 23 Jul 2006 21:23:39 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G4pAO-0006J4-3c for emacs-devel@gnu.org; Sun, 23 Jul 2006 21:23:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G4pAK-0006Ik-F8 for emacs-devel@gnu.org; Sun, 23 Jul 2006 21:23:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G4pAK-0006Ih-AJ for emacs-devel@gnu.org; Sun, 23 Jul 2006 21:23:24 -0400 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 1G4pBH-0007aB-6T; Sun, 23 Jul 2006 21:24:24 -0400 Original-Received: from [150.82.173.221] (helo=well-done.deisui.org) by well-done.deisui.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1G4pA3-00062z-UV; Mon, 24 Jul 2006 10:23:08 +0900 Original-To: emacs-devel@gnu.org X-Attribution: DU In-Reply-To: (Richard Stallman's message of "Mon, 17 Jul 2006 12:06:59 -0400") User-Agent: T-gnus/6.17.2 (based on No Gnus v0.2) EMIKO/1.14.1 (Choanoflagellata) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 EasyPG/0.0.3 MULE XEmacs/21.4 (patch 17) (Jumbo Shrimp) (i686-pc-linux) 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:57512 Archived-At: >>>>> In =20 >>>>> Richard Stallman wrote: > Would someone please fix this and ack? > ------- Start of forwarded message ------- > To: emacs-pretest-bug@gnu.org > From: andreas@altroot.de (Andreas =3D?iso-8859-1?Q?V=3DF6gele?=3D) > Date: Sat, 15 Jul 2006 21:31:39 +0200 > MIME-Version: 1.0 > Content-Type: text/plain; charset=3Dus-ascii > Cc: bugs@gnus.org > Subject: keys are sometimes not removed from pgg's password cache > X-Spam-Status: No, score=3D0.0 required=3D5.0 tests=3Dnone autolearn=3Dfa= iled=20 > version=3D3.0.4 > According to pgg.el "keys are truncated to 8 trailing characters > unless NOTRUNCATE is true". But actually the macro > pgp-truncate-key-identifier in pgg-def.el doesn't truncate keys. > Instead the first eight characters are removed from the key: > (pgg-truncate-key-identifier "xxxxxxxx123456789") > ; -> "123456789" > The macro is defined as follows: > (defmacro pgg-truncate-key-identifier (key) > `(if (> (length ,key) 8) (substring ,key 8) ,key)) > I think the second argument to substring should be -8 instead > of 8: > (defmacro pgg-truncate-key-identifier (key) > `(if (> (length ,key) 8) (substring ,key -8) ,key)) > I don't know why keys mustn't be longer than 8 characters. But the > fix above solved my problem. I probably recalled the intent of that function; it is used to truncate the long key ID (i.e. fingerprint) to the last 8 letters. The above fix is reasonable. I just installed the following patch in Gnus. Could someone install it to Emacs? 2006-07-24 Daiki Ueno * pgg-def.el (pgg-truncate-key-identifier): Truncate the key ID to 8 letters from the end. Thanks to "David Smith" and andreas@altroot.de (Andreas V=F6gele) --- pgg-def.el 9 Feb 2006 05:47:53 -0000 7.10 +++ pgg-def.el 24 Jul 2006 00:54:44 -0000 7.11 @@ -87,7 +87,7 @@ "If t, inform the recipient that the input is text.") =20 (defmacro pgg-truncate-key-identifier (key) - `(if (> (length ,key) 8) (substring ,key 8) ,key)) + `(if (> (length ,key) 8) (substring ,key -8) ,key)) =20 (provide 'pgg-def) Regards, --=20 Daiki Ueno