From: Jonathan McDowell Date: Mon, 15 Apr 2019 18:23:20 +0000 (+0100) Subject: Don't require a database connection for a key index X-Git-Tag: onak-0.6.0~59 X-Git-Url: https://the.earth.li/gitweb/?p=onak.git;a=commitdiff_plain;h=add20f8102d4e5a43957b62e59174378a23f4bc2 Don't require a database connection for a key index We need an active keydb backend if we want to be able to lookup UIDs for signatures, but if we don't have one we can still index the key. Only use keyid2uid when we have a non-NULL dbctx. --- diff --git a/keyindex.c b/keyindex.c index 94f52f7..4883f63 100644 --- a/keyindex.c +++ b/keyindex.c @@ -222,7 +222,9 @@ int list_sigs(struct onak_dbctx *dbctx, while (sigs != NULL) { sigid = sig_keyid(sigs->packet); - uid = dbctx->keyid2uid(dbctx, sigid); + if (dbctx) { + uid = dbctx->keyid2uid(dbctx, sigid); + } if (sigs->packet->data[0] == 4 && sigs->packet->data[1] == 0x30) { /* It's a Type 4 sig revocation */