[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PGG incompatible with GnuPG >=2.0.10 (patch included)

From: Ulrich Mueller
Subject: PGG incompatible with GnuPG >=2.0.10 (patch included)
Date: Thu, 18 Jun 2009 16:46:34 +0200

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 
| 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.


2009-06-18  Ulrich Mueller  <address@hidden>

        * 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")
-       (key-regexp (concat "^\\(sec\\|pub\\)"
+       (key-regexp (concat "^\\(sec\\|pub\\|uid\\)"
-                           ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")))
+                           ":[^:]*:[^:]*:[^:]*:\\([^:]+\\):")))
       (apply #'call-process pgg-gpg-program nil t nil args)
       (goto-char (point-min))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]