]> the.earth.li Git - onak.git/commitdiff
Fix up key deletion by key ID with onak tool
authorJonathan McDowell <noodles@earth.li>
Mon, 12 Aug 2019 17:59:54 +0000 (18:59 +0100)
committerJonathan McDowell <noodles@earth.li>
Mon, 12 Aug 2019 17:59:54 +0000 (18:59 +0100)
The call to db_delete_key() was claiming we were in a transaction, which
isn't true and causes failures with deletion with DB4.

onak.c

diff --git a/onak.c b/onak.c
index 384b6749f61c372c0d0077f6d8fa5602fff2f247..f4ece8f2150b2eb9f0795a271e7edf98ffc8c55f 100644 (file)
--- a/onak.c
+++ b/onak.c
@@ -389,11 +389,11 @@ int main(int argc, char *argv[])
                } else if (!strcmp("delete", argv[optind])) {
                        if (!isfp) {
                                if (dbctx->fetch_key_id(dbctx, keyid, &keys,
-                                                       true)) {
+                                                       false)) {
                                        get_fingerprint(keys->publickey,
                                                        &fingerprint);
                                        dbctx->delete_key(dbctx, &fingerprint,
-                                                       true);
+                                                       false);
                                }
                        } else
                                dbctx->delete_key(dbctx, &fingerprint, false);