char *search, uint64_t keyid,
struct openpgp_fingerprint *fingerprint,
bool ishex, bool isfp, bool dispfp, bool skshash,
- bool exact, bool verbose, bool mrhkp)
+ __unused bool exact, bool verbose, bool mrhkp)
{
struct openpgp_publickey *publickey = NULL;
int count = 0;
initlogthing("lookup", config.logfile);
catchsignals();
dbctx = config.dbinit(config.backend, false);
+ if (dbctx == NULL) {
+ logthing(LOGTHING_ERROR,
+ "Failed to open key database.");
+ goto err;
+ }
switch (op) {
case OP_GET:
case OP_HGET:
result,
search);
puts("<pre>");
- cleankeys(&publickey, config.clean_policies);
+ cleankeys(dbctx, &publickey,
+ config.clean_policies);
flatten_publickey(publickey,
&packets,
&list_end);
puts("Unknown operation!");
}
dbctx->cleanupdb(dbctx);
+err:
cleanuplogthing();
cleanupconfig();
}