aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-06-24 09:49:05 +0000
committerWerner Koch <[email protected]>2024-06-24 09:51:54 +0000
commite208ccc66c3432183eaa38e9d70ac288d7ba492c (patch)
tree5e4ae496265c4dd6150296358b5c97835b413e25
parentgpg: Add --import-option "no-seckeys". (diff)
downloadgnupg-e208ccc66c3432183eaa38e9d70ac288d7ba492c.tar.gz
gnupg-e208ccc66c3432183eaa38e9d70ac288d7ba492c.zip
gpg: Rename recently added import option no-seckeys to only-pubkeys.
* g10/import.c (parse_import_options): Rename option. * g10/options.h (IMPORT_NO_SECKEY): Rename to IMPORT_ONLY_PUBKEYS. Change all users. -- GnuPG-bug-id: 7146
-rw-r--r--doc/gpg.texi2
-rw-r--r--g10/import.c4
-rw-r--r--g10/keyserver.c8
-rw-r--r--g10/options.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/doc/gpg.texi b/doc/gpg.texi
index 965df7589..5c3bcf7ec 100644
--- a/doc/gpg.texi
+++ b/doc/gpg.texi
@@ -2037,7 +2037,7 @@ 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
+ @item only-pubkeys
Do now allow to import secret keys.
@item timeout
diff --git a/g10/import.c b/g10/import.c
index 1fc806fdc..657b2deb6 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -207,7 +207,7 @@ 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},
+ {"only-pubkeys", IMPORT_ONLY_PUBKEYS, NULL, NULL},
/* Aliases for backward compatibility */
{"allow-local-sigs",IMPORT_LOCAL_SIGS,NULL,NULL},
@@ -3026,7 +3026,7 @@ import_secret_one (ctrl_t ctrl, kbnode_t keyblock,
}
stats->secret_read++;
- if ((options & IMPORT_NO_SECKEY))
+ if ((options & IMPORT_ONLY_PUBKEYS))
{
if (!for_migration)
log_error (_("importing secret keys not allowed\n"));
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 57158003b..c2f2df2f9 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -1543,7 +1543,7 @@ keyserver_get_chunk (ctrl_t ctrl, KEYDB_SEARCH_DESC *desc, int ndesc,
/* For LDAP servers we reset IMPORT_SELF_SIGS_ONLY unless it has
* been set explicitly. */
- options = (opt.keyserver_options.import_options | IMPORT_NO_SECKEY);
+ options = (opt.keyserver_options.import_options | IMPORT_ONLY_PUBKEYS);
if (source && (!strncmp (source, "ldap:", 5)
|| !strncmp (source, "ldaps:", 6))
&& !opt.flags.expl_import_self_sigs_only)
@@ -1768,7 +1768,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
xfree (filtstr);
if (!err)
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
- IMPORT_NO_SECKEY,
+ IMPORT_ONLY_PUBKEYS,
NULL, NULL, KEYORG_DANE, NULL);
restore_import_filter (save_filt);
}
@@ -1777,7 +1777,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
{
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
(opt.keyserver_options.import_options
- | IMPORT_NO_SECKEY),
+ | IMPORT_ONLY_PUBKEYS),
NULL, NULL, 0, NULL);
}
@@ -1903,7 +1903,7 @@ keyserver_import_wkd (ctrl_t ctrl, const char *name, unsigned int flags,
xfree (filtstr);
if (!err)
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
- IMPORT_NO_SECKEY,
+ IMPORT_ONLY_PUBKEYS,
NULL, NULL, KEYORG_WKD, url);
}
diff --git a/g10/options.h b/g10/options.h
index 8234bc731..9cdd251b5 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -376,7 +376,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
#define IMPORT_MERGE_ONLY (1<<4)
#define IMPORT_MINIMAL (1<<5)
#define IMPORT_CLEAN (1<<6)
-#define IMPORT_NO_SECKEY (1<<7)
+#define IMPORT_ONLY_PUBKEYS (1<<7)
#define IMPORT_KEEP_OWNERTTRUST (1<<8)
#define IMPORT_EXPORT (1<<9)
#define IMPORT_RESTORE (1<<10)