From 7788aba7d86493c42617445f6d2344afdc332af5 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 d1142a373..965df7589 100644 --- a/doc/gpg.texi +++ b/doc/gpg.texi @@ -2037,6 +2037,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 f11dedc8b..1fc806fdc 100644 --- a/g10/import.c +++ b/g10/import.c @@ -207,6 +207,8 @@ parse_import_options(char *str,unsigned int *options,int noisy) {"show-only", (IMPORT_SHOW | IMPORT_DRY_RUN), NULL, NULL}, + {"no-seckeys", IMPORT_NO_SECKEY, NULL, NULL}, + /* Aliases for backward compatibility */ {"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL,NULL}, {"repair-hkp-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,NULL},