1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

g10: Eliminate the redundant function get_keyblock_byfprint.

* g10/keydb.h (get_keyblock_byfprint): Remove prototype.  Replace use
of this function with get_pubkey_byfprint.
* g10/getkey.c (get_pubkey_byname): Remove function.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
Neal H. Walfield 2015-09-14 20:55:59 +02:00
parent 911fcca36d
commit dc69804ab0
3 changed files with 1 additions and 33 deletions

View file

@ -1025,36 +1025,6 @@ get_pubkey_byfprint_fast (PKT_public_key * pk,
}
/* Search for a key with the given fingerprint and return the
* complete keyblock which may have more than only this key. */
int
get_keyblock_byfprint (KBNODE * ret_keyblock, const byte * fprint,
size_t fprint_len)
{
int rc;
if (fprint_len == 20 || fprint_len == 16)
{
struct getkey_ctx_s ctx;
memset (&ctx, 0, sizeof ctx);
ctx.not_allocated = 1;
ctx.kr_handle = keydb_new ();
ctx.nitems = 1;
ctx.items[0].mode = (fprint_len == 16
? KEYDB_SEARCH_MODE_FPR16
: KEYDB_SEARCH_MODE_FPR20);
memcpy (ctx.items[0].u.fpr, fprint, fprint_len);
rc = lookup (&ctx, ret_keyblock, NULL, 0);
getkey_end (&ctx);
}
else
rc = GPG_ERR_GENERAL; /* Oops */
return rc;
}
/* Get a secret key by NAME and store it into PK. If NAME is NULL use
* the default key. This functions checks that a corresponding secret
* key is available. With no secret key it does not succeeed. */