1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: New option --auto-key-import

* g10/gpg.c (opts): New options --auto-key-import,
--no-auto-key-import, and --no-include-key-block.
(gpgconf_list): Add them.
* g10/options.h (opt): Add field flags.auto_key_import.
* g10/mainproc.c (check_sig_and_print): Use flag to enable that
feature.
* tools/gpgconf-comp.c: Give the new options a Basic config level.
--

Note that the --no variants of the options are intended for easy
disabling at the command line.

GnuPG-bug-id: 4856
Signed-off-by: Werner Koch <wk@gnupg.org>

Backported from master.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-03-14 18:04:47 +01:00
parent b42d9f540c
commit 95b42278ca
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 44 additions and 11 deletions

View file

@ -756,6 +756,12 @@ static gc_option_t gc_options_gpg[] =
{ "auto-key-locate", GC_OPT_FLAG_NONE, GC_LEVEL_ADVANCED,
"gnupg", N_("|MECHANISMS|use MECHANISMS to locate keys by mail address"),
GC_ARG_TYPE_STRING, GC_BACKEND_GPG },
{ "auto-key-import", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
N_("import missing key from a signature"), "gnupg",
GC_ARG_TYPE_NONE, GC_BACKEND_GPG },
{ "include-key-block", GC_OPT_FLAG_NONE, GC_LEVEL_BASIC,
N_("include the public key in signatures"), "gnupg",
GC_ARG_TYPE_NONE, GC_BACKEND_GPG },
{ "auto-key-retrieve", GC_OPT_FLAG_NONE, GC_LEVEL_EXPERT,
NULL, NULL, GC_ARG_TYPE_NONE, GC_BACKEND_GPG },
{ "no-auto-key-retrieve", GC_OPT_FLAG_NONE, GC_LEVEL_INVISIBLE,