emacs-devel
[Top][All Lists]
Advanced

[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 
<address@hidden>::scESC:
| uid:-::::2007-04-14::6C417503DC0A22396443B86A6D17B18D33765C41::Ulrich Mueller 
<address@hidden>:
| 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 
<address@hidden>:
| uid:-::::1176565069::6C417503DC0A22396443B86A6D17B18D33765C41::Ulrich Mueller 
<address@hidden>:
| sub:-:2048:16:4CC72125BEE5C5AF:1173998442::::::e:
`----

The format of the "colon listings" is described here:
<http://cvs.gnupg.org/cgi-bin/viewcvs.cgi/*checkout*/tags/gnupg-2.0.11/doc/DETAILS?rev=4943&root=GnuPG>

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  <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")
                    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))




reply via email to

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