From 8e691efb0588500ea1d18431299c0f338a857306 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 11 Jun 2024 15:52:07 +0200 Subject: [PATCH] gpg: Add --import-option "no-seckeys". * g10/import.c (parse_import_options): Add "no-seckeys". -- GnuPG-bug-id: 7146 --- doc/gpg.texi | 3 +++ g10/import.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/doc/gpg.texi b/doc/gpg.texi index b69f39fe9..9d63b11e5 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2176,6 +2176,9 @@ are available for all keyserver types, some common options are: this option is not used with HKP keyservers, as they do not support retrieving keys by subkey id. + @item no-seckeys + Do now allow to import secret keys. + @item timeout @itemx http-proxy=@var{value} @itemx verbose diff --git a/g10/import.c b/g10/import.c index 0422b5c4a..45bf23c25 100644 --- a/g10/import.c +++ b/g10/import.c @@ -212,6 +212,8 @@ parse_import_options(char *str,unsigned int *options,int noisy) /* New options. Right now, without description string. */ {"ignore-attributes", IMPORT_IGNORE_ATTRIBUTES, NULL, NULL}, + {"no-seckeys", IMPORT_NO_SECKEY, NULL, NULL}, + /* Hidden options which are enabled by default and are provided * in case of problems with the respective implementation. */ {"collapse-uids", IMPORT_COLLAPSE_UIDS, NULL, NULL},