From c1056826224a30de55b558594114858fa8f5dd9a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 29 Aug 2025 12:38:16 +0200 Subject: gpg: Add option --no-auto-key-upload. * g10/gpg.c (oNoAutoKeyUpload): New. (opts): Add "no-auto-key-upload". (main): Clear the flag. --- doc/gpg.texi | 6 ++++-- g10/gpg.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/gpg.texi b/doc/gpg.texi index 8e963758f..fcef474f9 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2114,10 +2114,12 @@ tell both your IP address and the time when you verified the signature. @item --auto-key-upload +@itemx --no-auto-key-upload @opindex auto-key-upload If an LDAP keyserver is configured (in dirmngr) upload a newly created -key right directly to that server. Also upload publicly visible -changes to a key to such a server. +key directly to that server. Also upload publicly visible changes to +a key to such a server. The no variant can be used to disable it in +case it has been enabled in a configuration file. @item --keyid-format @{none|short|0xshort|long|0xlong@} @opindex keyid-format diff --git a/g10/gpg.c b/g10/gpg.c index 0244f77ee..da14747d3 100644 --- a/g10/gpg.c +++ b/g10/gpg.c @@ -380,6 +380,7 @@ enum cmd_and_opt_values oAutoKeyImport, oNoAutoKeyImport, oAutoKeyUpload, + oNoAutoKeyUpload, oUseAgent, oNoUseAgent, oGpgAgentInfo, @@ -810,6 +811,7 @@ static gpgrt_opt_t opts[] = { ARGPARSE_s_n (oAutoKeyRetrieve, "auto-key-retrieve", "@"), ARGPARSE_s_n (oNoAutoKeyRetrieve, "no-auto-key-retrieve", "@"), ARGPARSE_s_n (oAutoKeyUpload, "auto-key-upload", "@"), + ARGPARSE_s_n (oNoAutoKeyUpload, "no-auto-key-upload", "@"), ARGPARSE_s_n (oIncludeKeyBlock, "include-key-block", N_("include the public key in signatures")), ARGPARSE_s_n (oNoIncludeKeyBlock, "no-include-key-block", "@"), @@ -3609,6 +3611,7 @@ main (int argc, char **argv) break; case oAutoKeyUpload: opt.flags.auto_key_upload = 1; break; + case oNoAutoKeyUpload: opt.flags.auto_key_upload = 0; break; case oShowOnlySessionKey: opt.show_only_session_key = 1; -- cgit v1.2.3