mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
g10: Simplify semantics of get_pubkey_byname.
* g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return the keyblock in R_KEYBLOCK independent of whether PK is set or not. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>. Currently, no caller invokes get_pubkey_byname with PK==NULL and R_KEYBLOCK != NULL. Thus, this change does not change any behavior.
This commit is contained in:
parent
b4672e4d48
commit
911fcca36d
14
g10/getkey.c
14
g10/getkey.c
@ -962,14 +962,12 @@ get_pubkey_byfprint (PKT_public_key *pk, kbnode_t *r_keyblock,
|
||||
memcpy (ctx.items[0].u.fpr, fprint, fprint_len);
|
||||
rc = lookup (&ctx, &kb, &found_key, 0);
|
||||
if (!rc && pk)
|
||||
{
|
||||
pk_from_block (&ctx, pk, kb, found_key);
|
||||
if (r_keyblock)
|
||||
{
|
||||
*r_keyblock = kb;
|
||||
kb = NULL;
|
||||
}
|
||||
}
|
||||
pk_from_block (&ctx, pk, kb, found_key);
|
||||
if (!rc && r_keyblock)
|
||||
{
|
||||
*r_keyblock = kb;
|
||||
kb = NULL;
|
||||
}
|
||||
release_kbnode (kb);
|
||||
getkey_end (&ctx);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user