]> the.earth.li Git - onak.git/blobdiff - keydb.c
Improve handling of colliding 64-bit key IDs
[onak.git] / keydb.c
diff --git a/keydb.c b/keydb.c
index f8d5a0bd8ef60248157542ee55ec356a06a0ae4d..deedc4994e5f4441938ab3ef709c4e44e46034ba 100644 (file)
--- a/keydb.c
+++ b/keydb.c
@@ -200,17 +200,16 @@ int generic_update_keys(struct onak_dbctx *dbctx,
        struct openpgp_publickey *curkey = NULL;
        struct openpgp_publickey *oldkey = NULL;
        struct openpgp_publickey *prev = NULL;
+       struct openpgp_fingerprint fp;
        int newkeys = 0;
        bool intrans;
-       uint64_t keyid;
 
        for (curkey = *keys; curkey != NULL; curkey = curkey->next) {
                intrans = dbctx->starttrans(dbctx);
-               get_keyid(curkey, &keyid);
+               get_fingerprint(curkey->publickey, &fp);
                logthing(LOGTHING_INFO,
-                       "Fetching key 0x%" PRIX64 ", result: %d",
-                       keyid,
-                       dbctx->fetch_key_id(dbctx, keyid, &oldkey,
+                       "Fetching key, result: %d",
+                       dbctx->fetch_key_fp(dbctx, &fp, &oldkey,
                                        intrans));
 
                /*