Diffusion GnuPG 286d4c607574

gpg: Fix two other cases in get_best_pubkey_byname.

Authored by gniibe on Thu, Oct 17, 2:23 AM.

Description

gpg: Fix two other cases in get_best_pubkey_byname.

* g10/getkey.c (pubkey_cmp): Handle a primary key with
PUBKEY_USAGE_ENC, and make sure new key is for encryption.
(get_best_pubkey_byname): Add comment for ranking.
  • GnuPG-bug-id: T4713
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Committed
gniibeThu, Oct 17, 2:23 AM
Parents
rG627a990f8e30: doc: Fix documentation about --locate-keys.
Branches
Unknown
Tags
Unknown
Tasks
T4713: Bug in get_best_pubkey_byname