mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: New command --locate-external-key.
* g10/gpg.c (aLocateExtKeys): New.
(opts): Add --locate-external-keys.
(main): Implement that.
* g10/getkey.c (get_pubkey_byname): Implement GET_PUBKEY_NO_LOCAL.
(get_best_pubkey_byname): Add arg 'mode' and pass on to
get_pubkey_byname. Change callers.
* g10/keylist.c (public_key_list): Add arg 'no_local'.
(locate_one): Ditto. Pass on to get_best_pubkey_byname.
--
This new command is a shortcut for
--auto-key-locate nodefault,clear,wkd,... --locate-key
and uses the default or configured AKL list but does so without local.
See also
GnuPG-bug-id: 4599
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit d00c8024e5
)
This commit is contained in:
parent
1187143343
commit
46f3283b34
7 changed files with 63 additions and 32 deletions
|
@ -147,6 +147,7 @@ enum cmd_and_opt_values
|
|||
aSendKeys,
|
||||
aRecvKeys,
|
||||
aLocateKeys,
|
||||
aLocateExtKeys,
|
||||
aSearchKeys,
|
||||
aRefreshKeys,
|
||||
aFetchKeys,
|
||||
|
@ -499,6 +500,7 @@ static ARGPARSE_OPTS opts[] = {
|
|||
ARGPARSE_c (aRefreshKeys, "refresh-keys",
|
||||
N_("update all keys from a keyserver")),
|
||||
ARGPARSE_c (aLocateKeys, "locate-keys", "@"),
|
||||
ARGPARSE_c (aLocateExtKeys, "locate-external-keys", "@"),
|
||||
ARGPARSE_c (aFetchKeys, "fetch-keys" , "@" ),
|
||||
ARGPARSE_c (aShowKeys, "show-keys" , "@" ),
|
||||
ARGPARSE_c (aExportSecret, "export-secret-keys" , "@" ),
|
||||
|
@ -2561,6 +2563,7 @@ main (int argc, char **argv)
|
|||
#endif /* ENABLE_CARD_SUPPORT*/
|
||||
case aListKeys:
|
||||
case aLocateKeys:
|
||||
case aLocateExtKeys:
|
||||
case aListSigs:
|
||||
case aExportSecret:
|
||||
case aExportSecretSub:
|
||||
|
@ -4415,7 +4418,7 @@ main (int argc, char **argv)
|
|||
sl = NULL;
|
||||
for( ; argc; argc--, argv++ )
|
||||
add_to_strlist2( &sl, *argv, utf8_strings );
|
||||
public_key_list (ctrl, sl, 0);
|
||||
public_key_list (ctrl, sl, 0, 0);
|
||||
free_strlist(sl);
|
||||
break;
|
||||
case aListSecretKeys:
|
||||
|
@ -4426,10 +4429,11 @@ main (int argc, char **argv)
|
|||
free_strlist(sl);
|
||||
break;
|
||||
case aLocateKeys:
|
||||
case aLocateExtKeys:
|
||||
sl = NULL;
|
||||
for (; argc; argc--, argv++)
|
||||
add_to_strlist2( &sl, *argv, utf8_strings );
|
||||
public_key_list (ctrl, sl, 1);
|
||||
public_key_list (ctrl, sl, 1, cmd == aLocateExtKeys);
|
||||
free_strlist (sl);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue