diff options
author | Neal H. Walfield <[email protected]> | 2015-12-22 13:57:53 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-12-22 14:03:56 +0000 |
commit | 7195b94345b0bb937477dc47fc5ec27fb108a099 (patch) | |
tree | a05f3847d97129fdd58eb67a3b892155158d4bd1 /g10/pkclist.c | |
parent | gpg: Lazily evaluate --default-key. (diff) | |
download | gnupg-7195b94345b0bb937477dc47fc5ec27fb108a099.tar.gz gnupg-7195b94345b0bb937477dc47fc5ec27fb108a099.zip |
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 <[email protected]>
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.
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index b6a213fe2..d7e78cb7c 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -914,6 +914,13 @@ build_pk_list (ctrl_t ctrl, strlist_t rcpts, PK_LIST *ret_pk_list) else remusr = rcpts; + /* XXX: Change this function to use get_pubkeys instead of + get_pubkey_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 (opt.encrypt_to_default_key) { static int warned; |