mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
g10: Fix filtering by PK->REQ_USAGE.
* g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE. -- GnuPG-bug-id: 3844 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
6705ee42a4
commit
a17d2d1f69
@ -1810,6 +1810,8 @@ get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock,
|
||||
ctx.items[0].mode = fprint_len == 16 ? KEYDB_SEARCH_MODE_FPR16
|
||||
: KEYDB_SEARCH_MODE_FPR20;
|
||||
memcpy (ctx.items[0].u.fpr, fprint, fprint_len);
|
||||
if (pk)
|
||||
ctx.req_usage = pk->req_usage;
|
||||
rc = lookup (ctrl, &ctx, 0, &kb, &found_key);
|
||||
if (!rc && pk)
|
||||
pk_from_block (pk, kb, found_key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user