From: W. Trevor King Date: Sat, 6 Oct 2012 17:02:29 +0000 (-0400) Subject: mailpipe: update fingerprint access for pgp-mime `Key`s. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c982868cdd4386b17cbb08e9a74ab97fe386d789;p=pygrader.git mailpipe: update fingerprint access for pgp-mime `Key`s. Catching up with pgp-mime commit commit 1048b3045526d355ac0314597cc98713874b4e5d Author: W. Trevor King Date: Sat Oct 6 10:47:52 2012 -0400 key: flesh out to use KEYLIST's output XML. --- diff --git a/pygrader/mailpipe.py b/pygrader/mailpipe.py index d48c9e9..3dbc532 100644 --- a/pygrader/mailpipe.py +++ b/pygrader/mailpipe.py @@ -944,9 +944,9 @@ def _get_verified_message(message, pgp_key): fingerprints = dict((s.fingerprint, s) for s in signatures) for s in signatures: for key in _pgp_mime_key.lookup_keys([s.fingerprint]): - if key.fingerprint != s.fingerprint: + if key.subkeys[0].fingerprint != s.fingerprint: # the signature was made with a subkey. Add the primary. - fingerprints[key.fingerprint] = s + fingerprints[key.subkeys[0].fingerprint] = s if pgp_key.startswith('0x'): key_tail = pgp_key[len('0x'):] else: