1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-19 14:41:41 +02:00

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
This commit is contained in:
Werner Koch 2024-06-24 11:49:05 +02:00
parent 1067e544c2
commit 4c65dfeb28
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
4 changed files with 8 additions and 8 deletions

View File

@ -2176,7 +2176,7 @@ are available for all keyserver types, some common options are:
this option is not used with HKP keyservers, as they do not support this option is not used with HKP keyservers, as they do not support
retrieving keys by subkey id. retrieving keys by subkey id.
@item no-seckeys @item only-pubkeys
Do now allow to import secret keys. Do now allow to import secret keys.
@item timeout @item timeout

View File

@ -212,7 +212,7 @@ parse_import_options(char *str,unsigned int *options,int noisy)
/* New options. Right now, without description string. */ /* New options. Right now, without description string. */
{"ignore-attributes", IMPORT_IGNORE_ATTRIBUTES, NULL, NULL}, {"ignore-attributes", IMPORT_IGNORE_ATTRIBUTES, NULL, NULL},
{"no-seckeys", IMPORT_NO_SECKEY, NULL, NULL}, {"only-pubkeys", IMPORT_ONLY_PUBKEYS, NULL, NULL},
/* Hidden options which are enabled by default and are provided /* Hidden options which are enabled by default and are provided
* in case of problems with the respective implementation. */ * in case of problems with the respective implementation. */
@ -3191,7 +3191,7 @@ import_secret_one (ctrl_t ctrl, kbnode_t keyblock,
} }
stats->secret_read++; stats->secret_read++;
if ((options & IMPORT_NO_SECKEY)) if ((options & IMPORT_ONLY_PUBKEYS))
{ {
if (!for_migration) if (!for_migration)
log_error (_("importing secret keys not allowed\n")); log_error (_("importing secret keys not allowed\n"));

View File

@ -1518,7 +1518,7 @@ keyserver_get_chunk (ctrl_t ctrl, KEYDB_SEARCH_DESC *desc, int ndesc,
/* For LDAP servers we reset IMPORT_SELF_SIGS_ONLY and /* For LDAP servers we reset IMPORT_SELF_SIGS_ONLY and
* IMPORT_CLEAN unless they have been set explicitly. */ * IMPORT_CLEAN unless they have 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) if (source && (!strncmp (source, "ldap:", 5)
|| !strncmp (source, "ldaps:", 6))) || !strncmp (source, "ldaps:", 6)))
{ {
@ -1747,7 +1747,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
xfree (filtstr); xfree (filtstr);
if (!err) if (!err)
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len, err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
IMPORT_NO_SECKEY, IMPORT_ONLY_PUBKEYS,
NULL, NULL, KEYORG_DANE, NULL); NULL, NULL, KEYORG_DANE, NULL);
restore_import_filter (save_filt); restore_import_filter (save_filt);
} }
@ -1756,7 +1756,7 @@ keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
{ {
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len, err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
(opt.keyserver_options.import_options (opt.keyserver_options.import_options
| IMPORT_NO_SECKEY), | IMPORT_ONLY_PUBKEYS),
NULL, NULL, 0, NULL); NULL, NULL, 0, NULL);
} }
@ -1848,7 +1848,7 @@ keyserver_import_wkd (ctrl_t ctrl, const char *name, unsigned int flags,
xfree (filtstr); xfree (filtstr);
if (!err) if (!err)
err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len, err = import_keys_es_stream (ctrl, key, NULL, fpr, fpr_len,
IMPORT_NO_SECKEY, IMPORT_ONLY_PUBKEYS,
NULL, NULL, KEYORG_WKD, url); NULL, NULL, KEYORG_WKD, url);
} }

View File

@ -409,7 +409,7 @@ EXTERN_UNLESS_MAIN_MODULE int memory_stat_debug_mode;
#define IMPORT_MERGE_ONLY (1<<4) #define IMPORT_MERGE_ONLY (1<<4)
#define IMPORT_MINIMAL (1<<5) #define IMPORT_MINIMAL (1<<5)
#define IMPORT_CLEAN (1<<6) #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_KEEP_OWNERTTRUST (1<<8)
#define IMPORT_EXPORT (1<<9) #define IMPORT_EXPORT (1<<9)
#define IMPORT_RESTORE (1<<10) #define IMPORT_RESTORE (1<<10)