mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gnupg extension are now working
This commit is contained in:
parent
37d2adfe61
commit
e662bf708b
33 changed files with 1411 additions and 713 deletions
10
g10/getkey.c
10
g10/getkey.c
|
@ -474,16 +474,18 @@ get_pubkey_byname( PKT_public_cert *pkc, const char *name )
|
|||
/****************
|
||||
* Search for a key with the given fingerprint and return the
|
||||
* complete keyblock which may have more than only this key.
|
||||
* The fingerprint should always be 20 bytes, fill with zeroes
|
||||
* for 16 byte fprints.
|
||||
*/
|
||||
int
|
||||
get_keyblock_byfprint( KBNODE *ret_keyblock, const byte *fprint )
|
||||
get_keyblock_byfprint( KBNODE *ret_keyblock, const byte *fprint,
|
||||
size_t fprint_len )
|
||||
{
|
||||
int rc;
|
||||
PKT_public_cert *pkc = m_alloc_clear( sizeof *pkc );
|
||||
|
||||
rc = lookup( pkc, 20, NULL, fprint, ret_keyblock );
|
||||
if( fprint_len == 20 || fprint_len == 16 )
|
||||
rc = lookup( pkc, fprint_len, NULL, fprint, ret_keyblock );
|
||||
else
|
||||
rc = G10ERR_GENERAL; /* Oops */
|
||||
|
||||
free_public_cert( pkc );
|
||||
return rc;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue