Diffusion GnuPG f2734381ae14

gpg: Fix get_best_pubkey_byname to consider the first match.

Authored by gniibe on Wed, Oct 16, 8:58 AM.

Description

gpg: Fix get_best_pubkey_byname to consider the first match.

* g10/getkey.c (get_best_pubkey_byname): Always use PK0 to search
by get_pubkey_byname.  Add initial call to pubkey_cmp to fill
BEST at first before the loop.

Details