aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-09-14 19:22:31 +0000
committerNeal H. Walfield <[email protected]>2015-09-16 13:15:24 +0000
commite2b300801ed7143fa924df5442ec2b61079c0bbb (patch)
tree010dcf044f44374daa9536dcf71c911a62393ce6 /g10/getkey.c
parentg10: Simplify get_seckey_byname: it was never called with NAME not NULL. (diff)
downloadgnupg-e2b300801ed7143fa924df5442ec2b61079c0bbb.tar.gz
gnupg-e2b300801ed7143fa924df5442ec2b61079c0bbb.zip
g10: Remove unused function get_seckey_byfprint.
* g10/keydb.h (get_seckey_byfprint): Remove prototype. * g10/getkey.c (get_seckey_byfprint): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
Diffstat (limited to '')
-rw-r--r--g10/getkey.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index 70960667b..2f97000ca 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -1048,42 +1048,6 @@ get_seckey_default (PKT_public_key *pk)
}
-
-/* Search for a key with the given fingerprint.
- * FIXME:
- * We should replace this with the _byname function. This can be done
- * by creating a userID conforming to the unified fingerprint style. */
-gpg_error_t
-get_seckey_byfprint (PKT_public_key *pk, const byte * fprint, size_t fprint_len)
-{
- gpg_error_t err;
-
- if (fprint_len == 20 || fprint_len == 16)
- {
- struct getkey_ctx_s ctx;
- kbnode_t kb = NULL;
- kbnode_t found_key = NULL;
-
- memset (&ctx, 0, sizeof ctx);
- ctx.exact = 1;
- 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, &kb, &found_key, 1);
- if (!err && pk)
- pk_from_block (&ctx, pk, kb, found_key);
- release_kbnode (kb);
- getkey_end (&ctx);
- }
- else
- err = gpg_error (GPG_ERR_BUG);
- 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. */