]> the.earth.li Git - onak.git/commitdiff
Make wotsap ignore revoked keys
authorJonathan McDowell <noodles@earth.li>
Wed, 9 Oct 2013 16:35:29 +0000 (17:35 +0100)
committerJonathan McDowell <noodles@earth.li>
Wed, 9 Oct 2013 16:35:29 +0000 (17:35 +0100)
wotsap wasn't paying attention to keys that were revoked, leading to them
being included in the output key/signature lists. Force the load of a key
before colouring it so we can ignore it if it's revoked.

wotsap.c

index 339b949b798ddbdea60639f598613512ac982ced..8990787a135b9df43eabb13964d44bc3d5555ed0 100644 (file)
--- a/wotsap.c
+++ b/wotsap.c
@@ -139,12 +139,16 @@ static void wotsap(uint64_t keyid, char *dir)
                sigcount = 0;
                while (sigll != NULL) {
                        addkey = (struct stats_key *) sigll->object;
-                       if (addkey->colour == 0) {
+                       if (addkey->colour == 0 && !addkey->revoked) {
                                uid = config.dbbackend->keyid2uid(addkey->keyid);
                                if (uid != NULL) {
-                                       addkey->colour = ++curidx;
-                                       pending = lladdend(pending, addkey);
-                                       output_key(names, keys, addkey->keyid);
+                                       /* Force it to be loaded so we know if it's revoked */
+                                       config.dbbackend->cached_getkeysigs(addkey->keyid);
+                                       if (!addkey->revoked) {
+                                               addkey->colour = ++curidx;
+                                               pending = lladdend(pending, addkey);
+                                               output_key(names, keys, addkey->keyid);
+                                       }
                                }
                        }
                        if (addkey->colour != 0) {