mailpipe: update fingerprint access for pgp-mime `Key`s.
authorW. Trevor King <wking@tremily.us>
Sat, 6 Oct 2012 17:02:29 +0000 (13:02 -0400)
committerW. Trevor King <wking@tremily.us>
Sat, 6 Oct 2012 17:02:29 +0000 (13:02 -0400)
Catching up with pgp-mime commit

  commit 1048b3045526d355ac0314597cc98713874b4e5d
  Author: W. Trevor King <wking@tremily.us>
  Date:   Sat Oct 6 10:47:52 2012 -0400

    key: flesh out to use KEYLIST's output XML.

pygrader/mailpipe.py

index d48c9e980098fcd843d0442fa12ba09bdbdd4c8b..3dbc53286bbf833020058e0815eed4f86da1c4e2 100644 (file)
@@ -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: