mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
g10: Remove unused function get_seckeyblock_byfprint.
* g10/keydb.h (get_seckeyblock_byfprint): Remove prototype. * g10/getkey.c (get_seckeyblock_byfprint): Remove function. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>.
This commit is contained in:
parent
e2b300801e
commit
efbaa8f891
29
g10/getkey.c
29
g10/getkey.c
@ -1046,35 +1046,6 @@ get_seckey_default (PKT_public_key *pk)
|
|||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Search for a secret key with the given fingerprint and return the
|
|
||||||
complete keyblock which may have more than only this key. Return
|
|
||||||
an error if no corresponding secret key is available. */
|
|
||||||
gpg_error_t
|
|
||||||
get_seckeyblock_byfprint (kbnode_t *ret_keyblock,
|
|
||||||
const byte *fprint, size_t fprint_len)
|
|
||||||
{
|
|
||||||
gpg_error_t err;
|
|
||||||
struct getkey_ctx_s ctx;
|
|
||||||
|
|
||||||
if (fprint_len != 20 && fprint_len == 16)
|
|
||||||
return gpg_error (GPG_ERR_BUG);
|
|
||||||
|
|
||||||
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);
|
|
||||||
err = lookup (&ctx, ret_keyblock, NULL, 1);
|
|
||||||
getkey_end (&ctx);
|
|
||||||
|
|
||||||
return err;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* The new function to return a key.
|
/* The new function to return a key.
|
||||||
FIXME: Document it. */
|
FIXME: Document it. */
|
||||||
|
@ -421,9 +421,6 @@ int have_secret_key_with_kid (u32 *keyid);
|
|||||||
|
|
||||||
gpg_error_t get_seckey_default (PKT_public_key *pk);
|
gpg_error_t get_seckey_default (PKT_public_key *pk);
|
||||||
|
|
||||||
gpg_error_t get_seckeyblock_byfprint (kbnode_t *ret_keyblock,
|
|
||||||
const byte *fprint, size_t fprint_len);
|
|
||||||
|
|
||||||
gpg_error_t getkey_bynames (getkey_ctx_t *retctx, PKT_public_key *pk,
|
gpg_error_t getkey_bynames (getkey_ctx_t *retctx, PKT_public_key *pk,
|
||||||
strlist_t names, int want_secret,
|
strlist_t names, int want_secret,
|
||||||
kbnode_t *ret_keyblock);
|
kbnode_t *ret_keyblock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user