}
catchsignals();
dbctx = config.dbinit(config.backend, false);
-
- count = cleankeys(&keys, config.clean_policies);
+ if (dbctx == NULL) {
+ logthing(LOGTHING_ERROR,
+ "Failed to open key database.");
+ goto err;
+ }
+
+ count = cleankeys(dbctx, &keys, config.clean_policies);
logthing(LOGTHING_INFO, "%d keys cleaned.",
count);
- count = dbctx->update_keys(dbctx, &keys, true);
+ count = dbctx->update_keys(dbctx, &keys,
+ &config.blacklist,
+ config.clean_policies & ONAK_CLEAN_UPDATE_ONLY,
+ true);
logthing(LOGTHING_NOTICE, "Got %d new keys.",
count);
puts("No OpenPGP packets found in input.");
end_html();
}
+err:
cleanuplogthing();
cleanupconfig();
}