]> the.earth.li Git - onak.git/commitdiff
Another deletion fix of 64 bit keys in DB4 backend
authorJonathan McDowell <noodles@earth.li>
Tue, 19 Nov 2013 05:44:46 +0000 (21:44 -0800)
committerJonathan McDowell <noodles@earth.li>
Tue, 19 Nov 2013 05:44:46 +0000 (21:44 -0800)
We weren't deleting the actual key data when a key had been correctly
stored using its fingerprint.

keydb_db4.c

index 20a12fdc31f74c25d641c87dfa1bb29527282472..43f16741bad0d931dc36ad4e50d2eff778572236 100644 (file)
@@ -1124,6 +1124,16 @@ static int db4_delete_key(struct onak_dbctx *dbctx,
        publickey = NULL;
 
        if (!deadlock) {
+               key.data = fingerprint.fp;
+               key.size = fingerprint.length;
+
+               keydb_fp(privctx, &fingerprint)->del(keydb_fp(privctx,
+                                       &fingerprint),
+                               privctx->txn,
+                               &key,
+                               0); /* flags */
+
+               /* Delete old style 64 bit keyid */
                key.data = &keyid;
                key.size = sizeof(keyid);