From: Jonathan McDowell Date: Wed, 9 Oct 2013 16:35:29 +0000 (+0100) Subject: Make wotsap ignore revoked keys X-Git-Tag: onak-0.4.3~52 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=d781cc7c24d81c7461a2a5a6bf5125c0e5982d57;p=onak.git Make wotsap ignore revoked keys 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. --- diff --git a/wotsap.c b/wotsap.c index 339b949..8990787 100644 --- 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) {