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>
This commit is contained in:
parent
9980f81da7
commit
d00c8024e5
7 changed files with 63 additions and 32 deletions
|
@ -149,6 +149,7 @@ enum cmd_and_opt_values
|
|||
aSendKeys,
|
||||
aRecvKeys,
|
||||
aLocateKeys,
|
||||
aLocateExtKeys,
|
||||
aSearchKeys,
|
||||
aRefreshKeys,
|
||||
aFetchKeys,
|
||||
|
@ -503,6 +504,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" , "@" ),
|
||||
|
@ -2612,6 +2614,7 @@ main (int argc, char **argv)
|
|||
#endif /* ENABLE_CARD_SUPPORT*/
|
||||
case aListKeys:
|
||||
case aLocateKeys:
|
||||
case aLocateExtKeys:
|
||||
case aListSigs:
|
||||
case aExportSecret:
|
||||
case aExportSecretSub:
|
||||
|
@ -4512,7 +4515,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:
|
||||
|
@ -4523,10 +4526,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