X-Git-Url: http://the.earth.li/gitweb/?a=blobdiff_plain;f=keydb.h;h=6ad9a59fb46403d6da242bb5559681fa5dca1d34;hb=0e735a0b184b202a0533c52171fc55506fa45db2;hp=20ab62f3bef32096ce50787c299e46f98c2f190c;hpb=d38e1f468376f8b19b208f2da4d20cb2919875dd;p=onak.git diff --git a/keydb.h b/keydb.h index 20ab62f..6ad9a59 100644 --- a/keydb.h +++ b/keydb.h @@ -75,7 +75,23 @@ struct dbfuncs { * * TODO: What about keyid collisions? Should we use fingerprint instead? */ - int (*fetch_key)(uint64_t keyid, struct openpgp_publickey **publickey, + int (*fetch_key_id)(uint64_t keyid, + struct openpgp_publickey **publickey, + bool intrans); + +/** + * @brief Given a fingerprint fetch the key from storage. + * @param fp The fingerprint to fetch. + * @param fpsize Number of bytes in the fingerprint (16 for v3, 20 for v4) + * @param publickey A pointer to a structure to return the key in. + * @param intrans If we're already in a transaction. + * + * This function returns a public key from whatever storage mechanism we + * are using. + */ + int (*fetch_key_fp)(uint8_t *fp, + size_t fpsize, + struct openpgp_publickey **publickey, bool intrans); /**