From d00c8024e58822e0623b3fad99248ce68a8b7725 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 4 Jul 2019 15:13:26 +0200 Subject: 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 --- g10/pkclist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'g10/pkclist.c') diff --git a/g10/pkclist.c b/g10/pkclist.c index 66a1f0655..1fd23a3e4 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -834,7 +834,8 @@ find_and_check_key (ctrl_t ctrl, const char *name, unsigned int use, if (from_file) rc = get_pubkey_fromfile (ctrl, pk, name); else - rc = get_best_pubkey_byname (ctrl, NULL, pk, name, &keyblock, 0); + rc = get_best_pubkey_byname (ctrl, GET_PUBKEY_NORMAL, + NULL, pk, name, &keyblock, 0); if (rc) { int code; -- cgit v1.2.3