Diffusion GnuPG 7195b94345b0

gpg: Don't check for ambiguous keys.

Authored by neal on Dec 22 2015, 2:57 PM.

Description

gpg: Don't check for ambiguous keys.

* g10/gpg.c (struct result): Move from here...
* g10/keydb.h (struct pubkey): ... to here.  Update users.
* g10/gpg.c (check_user_ids): Move from here...
* g10/getkey.c (get_pubkeys): ... to here.  Update users.  Use
get_pubkey_byname to look up the keys (this also prunes invalid keys).
(pubkey_free): New function.
(pubkeys_free): New function.
* g10/gpg.c (main): Don't check for ambiguous key specifications.

This change not only moves the checks for ambiguous key specifications
from gpg.c to getkey.c, it also disables the checks. The old code was
too divorced from the actual key lookups and, as such, it reproduced
the logic. Unfortunately, the reproduction was a poor one: despite
fixing some inconsistencies (e.g., 10cca02), it still didn't deal with
group expansion or the auto key lookup functionality. Given the
amount of instability introduced by this change, we (Neal & Werner)
decided it is better to defer introducing this functionality until
2.3.

  • Signed-off-by: Neal H. Walfield <neal@g10code.com>
  • Regression-due-to: e8c53fc

Details

Committed
nealDec 22 2015, 3:03 PM
Parents
rGdc52995d8504: gpg: Lazily evaluate --default-key.
Branches
Unknown
Tags
Unknown
Neal H. Walfield <neal@g10code.com> committed rG7195b94345b0: gpg: Don't check for ambiguous keys. (authored by Neal H. Walfield <neal@g10code.com>).Dec 22 2015, 3:03 PM