mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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. -- Signed-off-by: Neal H. Walfield <neal@g10code.com> Regression-due-to:e8c53fc
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.
This commit is contained in:
parent
dc52995d85
commit
7195b94345
6 changed files with 316 additions and 512 deletions
|
@ -120,6 +120,13 @@ build_sk_list (ctrl_t ctrl,
|
|||
gpg_error_t err;
|
||||
SK_LIST sk_list = NULL;
|
||||
|
||||
/* XXX: Change this function to use get_pubkeys instead of
|
||||
getkey_byname to detect ambiguous key specifications and warn
|
||||
about duplicate keyblocks. For ambiguous key specifications on
|
||||
the command line or provided interactively, prompt the user to
|
||||
select the best key. If a key specification is ambiguous and we
|
||||
are in batch mode, die. */
|
||||
|
||||
if (!locusr) /* No user ids given - use the default key. */
|
||||
{
|
||||
PKT_public_key *pk;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue