diff options
author | Neal H. Walfield <[email protected]> | 2015-11-05 16:29:53 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2015-11-06 11:04:35 +0000 |
commit | e8c53fca954d33366e3494a6d4eecc3868282bcc (patch) | |
tree | f5408893983c8e1c4e6af9fb4410fb4d916d4247 /g10/getkey.c | |
parent | common: Add new function strlist_rev. (diff) | |
download | gnupg-e8c53fca954d33366e3494a6d4eecc3868282bcc.tar.gz gnupg-e8c53fca954d33366e3494a6d4eecc3868282bcc.zip |
gpg: Check for ambiguous or non-matching key specs.
* g10/gpg.c (check_user_ids): New function.
(main): Check that any user id specifications passed to --local-user
and --remote-user correspond to exactly 1 user. Check that any user
id specifications passed to --default-key correspond to at most 1
user. Warn if any user id specifications passed to --local-user or
--default-user are possible ambiguous (are not specified by long keyid
or fingerprint).
* g10/getkey.c (parse_def_secret_key): Don't warn about possible
ambiguous key descriptions here.
--
Signed-off-by: Neal H. Walfield <[email protected]>
GnuPG-bug-id: 1128
Debian-debug-id: 544490
Diffstat (limited to 'g10/getkey.c')
-rw-r--r-- | g10/getkey.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index b4086a270..9e123ee7f 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -1142,15 +1142,6 @@ parse_def_secret_key (ctrl_t ctrl) continue; } - if (! (desc.mode == KEYDB_SEARCH_MODE_LONG_KID - || desc.mode == KEYDB_SEARCH_MODE_FPR16 - || desc.mode == KEYDB_SEARCH_MODE_FPR20 - || desc.mode == KEYDB_SEARCH_MODE_FPR) - && ! warned) - log_info (_("Warning: value '%s' for --default-key" - " should be a long keyid or a fingerprint.\n"), - t->d); - if (! hd) hd = keydb_new (); else |