From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.devel Subject: PGG incompatible with GnuPG >=2.0.10 (patch included) Date: Thu, 18 Jun 2009 16:46:34 +0200 Message-ID: <19002.21322.769723.740121@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1245338279 4785 80.91.229.12 (18 Jun 2009 15:17:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2009 15:17:59 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jun 18 17:17:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MHJNC-0008RU-Nc for ged-emacs-devel@m.gmane.org; Thu, 18 Jun 2009 17:17:55 +0200 Original-Received: from localhost ([127.0.0.1]:52759 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHJNC-0002Uu-1A for ged-emacs-devel@m.gmane.org; Thu, 18 Jun 2009 11:17:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MHIt7-0005XU-BI for emacs-devel@gnu.org; Thu, 18 Jun 2009 10:46:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MHIt2-0005PK-IJ for emacs-devel@gnu.org; Thu, 18 Jun 2009 10:46:48 -0400 Original-Received: from [199.232.76.173] (port=53633 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MHIt2-0005Oj-Dq for emacs-devel@gnu.org; Thu, 18 Jun 2009 10:46:44 -0400 Original-Received: from a1iwww1.kph.uni-mainz.de ([134.93.134.1]:35355) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MHIt0-00088E-Td for emacs-devel@gnu.org; Thu, 18 Jun 2009 10:46:43 -0400 Original-Received: from a1i15.kph.uni-mainz.de (a1i15.kph.uni-mainz.de [134.93.134.92]) by a1iwww1.kph.uni-mainz.de (8.14.0/8.13.4) with ESMTP id n5IEkYam011156 for ; Thu, 18 Jun 2009 16:46:34 +0200 Original-Received: from a1i15.kph.uni-mainz.de (localhost [127.0.0.1]) by a1i15.kph.uni-mainz.de (8.14.2/8.14.2) with ESMTP id n5IEkYDC014100; Thu, 18 Jun 2009 16:46:34 +0200 Original-Received: (from ulm@localhost) by a1i15.kph.uni-mainz.de (8.14.2/8.14.2/Submit) id n5IEkYYJ014095; Thu, 18 Jun 2009 16:46:34 +0200 X-Mailer: VM 8.0.12 under 22.3.1 (x86_64-pc-linux-gnu) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) 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:111580 Archived-At: GnuPG has changed the output format for listing of keys with "gpg --with-colons --list-keys". It doesn't merge the primary user ID and the primary key any more: ,----[ GnuPG 2.0.9 ] | tru::1:1245322604:0:3:1:5 | pub:-:1024:17:39EA32FE8222EEEC:2007-03-15:::-:Ulrich Mueller ::scESC: | uid:-::::2007-04-14::6C417503DC0A22396443B86A6D17B18D33765C41::Ulrich Mueller : | sub:-:2048:16:4CC72125BEE5C5AF:2007-03-15::::::e: `---- ,----[ GnuPG 2.0.11 ] | tru::1:1245322604:0:3:1:5 | pub:-:1024:17:39EA32FE8222EEEC:1173998442:::-:::scESC: | uid:-::::1176565513::5F7ECDB3196B011228D6B4CE204DC59E1E588022::Ulrich Mueller : | uid:-::::1176565069::6C417503DC0A22396443B86A6D17B18D33765C41::Ulrich Mueller : | sub:-:2048:16:4CC72125BEE5C5AF:1173998442::::::e: `---- The format of the "colon listings" is described here: Unfortunately, PGG expects the user ID in the "pub" line and therefore fails to parse the new output format. Attached is a patch that fixes the problem for me. Ulrich 2009-06-18 Ulrich Mueller * pgg-gpg.el (pgg-gpg-lookup-key-owner): Change regexp to make parsing of keys work with GnuPG 2.0.10 and later. --- emacs-orig/lisp/pgg-gpg.el +++ emacs-lisp/pgg-gpg.el @@ -189,9 +189,9 @@ (let ((args (list "--with-colons" "--no-greeting" "--batch" (if all "--list-secret-keys" "--list-keys") string)) - (key-regexp (concat "^\\(sec\\|pub\\)" + (key-regexp (concat "^\\(sec\\|pub\\|uid\\)" ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*" - ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):"))) + ":[^:]*:[^:]*:[^:]*:\\([^:]+\\):"))) (with-temp-buffer (apply #'call-process pgg-gpg-program nil t nil args) (goto-char (point-min))