[pius-commit] pius pius,1.40,1.41
Brought to you by:
jaymzh
|
From: Phil D. <ja...@us...> - 2011-04-13 18:58:06
|
Update of /cvsroot/pgpius/pius
In directory vz-cvs-2.sog:/tmp/cvs-serv1376
Modified Files:
pius
Log Message:
[regression] 2.0.9 stopped recognizing old-style keys
PIUS once again recognizes old-style keys.
Closes #3286119
Signed-off-by: Phil Dibowitz <ph...@ip...>
Index: pius
===================================================================
RCS file: /cvsroot/pgpius/pius/pius,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- pius 13 Mar 2011 02:00:16 -0000 1.40
+++ pius 13 Apr 2011 18:58:04 -0000 1.41
@@ -229,14 +229,15 @@
' --fingerprint --fixed-list-mode 2>&1' % (self.gpg, self.keyring))
debug(cmd)
gpg = os.popen(cmd, 'r')
- fpr_re = re.compile('^fpr:')
+ # We use 'pub' instead of 'fpr' to support old crufty keys too...
+ pub_re = re.compile('^pub:')
uid_re = re.compile('^uid:')
key_tuples = []
name = keyid = None
for line in gpg.readlines():
- if fpr_re.match(line):
+ if pub_re.match(line):
lineparts = line.split(':')
- keyid = lineparts[9][32:40]
+ keyid = lineparts[4][8:16]
elif keyid and uid_re.match(line):
lineparts = line.split(':')
name = lineparts[9]
|