X-Git-Url: https://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb_stacked.c;h=ee1c5cfa63df4475dbcb22cd9767bb6afe50e70b;hb=42977c5361ef21c99bc157e9c7edbba49243014f;hp=06ee7098bb08f6d58a90f90e69e878296a9eb77f;hpb=6df51fef2960f533a741fb7290867387ed3fbba5;p=onak.git diff --git a/keydb_stacked.c b/keydb_stacked.c index 06ee709..ee1c5cf 100644 --- a/keydb_stacked.c +++ b/keydb_stacked.c @@ -71,7 +71,8 @@ static int stacked_store_key(struct onak_dbctx *dbctx, publickey, intrans, update); } -static int stacked_delete_key(struct onak_dbctx *dbctx, uint64_t keyid, +static int stacked_delete_key(struct onak_dbctx *dbctx, + struct openpgp_fingerprint *fp, bool intrans) { struct onak_stacked_dbctx *privctx = @@ -80,7 +81,7 @@ static int stacked_delete_key(struct onak_dbctx *dbctx, uint64_t keyid, (struct onak_dbctx *) privctx->backends->object; return backend->delete_key(backend, - keyid, intrans); + fp, intrans); } static int stacked_update_keys(struct onak_dbctx *dbctx, @@ -113,7 +114,7 @@ static void store_on_fallback(struct onak_stacked_dbctx *privctx, (struct onak_dbctx *) privctx->backends->object; struct openpgp_publickey *curkey; - cleankeys(publickey); + cleankeys(&publickey, config.clean_policies); /* * If we walked the stack at all, store the key in the first * backend if configured to do so. It's not an update as we @@ -230,7 +231,6 @@ static int stacked_fetch_key_skshash(struct onak_dbctx *dbctx, */ #define NEED_KEYID2UID 1 #define NEED_GETKEYSIGS 1 -#define NEED_GETFULLKEYID 1 #define NEED_UPDATEKEYS 1 #include "keydb.c" @@ -285,23 +285,6 @@ static char *stacked_keyid2uid(struct onak_dbctx *dbctx, return res; } -static uint64_t stacked_getfullkeyid(struct onak_dbctx *dbctx, - uint64_t keyid) -{ - struct onak_stacked_dbctx *privctx = - (struct onak_stacked_dbctx *) dbctx->priv; - struct onak_dbctx *backend = - (struct onak_dbctx *) privctx->backends->object; - uint64_t res = 0; - - res = backend->getfullkeyid(backend, keyid); - if (res == 0) { - res = generic_getfullkeyid(dbctx, keyid); - } - - return res; -} - static void stacked_cleanupdb(struct onak_dbctx *dbctx) { struct onak_stacked_dbctx *privctx = @@ -392,7 +375,6 @@ struct onak_dbctx *keydb_stacked_init(struct onak_db_config *dbcfg, dbctx->getkeysigs = stacked_getkeysigs; dbctx->cached_getkeysigs = stacked_cached_getkeysigs; dbctx->keyid2uid = stacked_keyid2uid; - dbctx->getfullkeyid = stacked_getfullkeyid; dbctx->iterate_keys = stacked_iterate_keys; }