diff options
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index b73a00616..912c91906 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -464,6 +464,20 @@ get_pubkey_byname( PKT_public_key *pk, const char *name ) } +/**************** + * Search for a key with the given fingerprint. + */ +int +get_pubkey_byfprint( PKT_public_key *pk, const byte *fprint, size_t fprint_len) +{ + int rc; + + if( fprint_len == 20 || fprint_len == 16 ) + rc = lookup( pk, fprint_len, NULL, fprint, NULL ); + else + rc = G10ERR_GENERAL; /* Oops */ + return rc; +} /**************** * Search for a key with the given fingerprint and return the |