if (ishex) {
count = dbctx->fetch_key_id(dbctx, keyid, &publickey,
false);
if (ishex) {
count = dbctx->fetch_key_id(dbctx, keyid, &publickey,
false);
- result = cleankeys(&keys, config.clean_policies);
+ dbctx = config.dbinit(config.backend, false);
+ result = cleankeys(dbctx, &keys,
+ config.clean_policies);
logthing(LOGTHING_NOTICE, "Got %d new keys.",
dbctx->update_keys(dbctx, &keys,
logthing(LOGTHING_NOTICE, "Got %d new keys.",
dbctx->update_keys(dbctx, &keys,
logthing(LOGTHING_NOTICE, "No changes.");
}
} else if (!strcmp("clean", argv[optind])) {
logthing(LOGTHING_NOTICE, "No changes.");
}
} else if (!strcmp("clean", argv[optind])) {
} else if (!strcmp("dumpconfig", argv[optind])) {
if ((argc - optind) == 2) {
writeconfig(argv[optind + 1]);
} else if (!strcmp("dumpconfig", argv[optind])) {
if ((argc - optind) == 2) {
writeconfig(argv[optind + 1]);
if (!strcmp("index", argv[optind])) {
find_keys(dbctx, search, keyid, &fingerprint, ishex,
isfp, dispfp, skshash,
if (!strcmp("index", argv[optind])) {
find_keys(dbctx, search, keyid, &fingerprint, ishex,
isfp, dispfp, skshash,
} else if (!strcmp("vindex", argv[optind])) {
find_keys(dbctx, search, keyid, &fingerprint, ishex,
isfp, dispfp, skshash,
} else if (!strcmp("vindex", argv[optind])) {
find_keys(dbctx, search, keyid, &fingerprint, ishex,
isfp, dispfp, skshash,
} else if (!strcmp("getphoto", argv[optind])) {
if (!ishex) {
puts("Can't get a key on uid text."
} else if (!strcmp("getphoto", argv[optind])) {
if (!ishex) {
puts("Can't get a key on uid text."
if (dbctx->fetch_key_id(dbctx, keyid, &keys, true)) {
get_fingerprint(keys->publickey, &fingerprint);
dbctx->delete_key(dbctx, &fingerprint, true);
if (dbctx->fetch_key_id(dbctx, keyid, &keys, true)) {
get_fingerprint(keys->publickey, &fingerprint);
dbctx->delete_key(dbctx, &fingerprint, true);
dbctx->store_key(dbctx, keys, true, false);
} else {
puts("Key not found");
dbctx->store_key(dbctx, keys, true, false);
} else {
puts("Key not found");