gpgsm: Retire the new --ldapserver.

* sm/gpgsm.c (oKeyServer_deprecated): New.
(opts): Assign "ldapserver" to the new option and mark it as obsolete.
--

We want to use "ldapserver" in dirmngr but need to keep using
"keyserver" in gpgsm for existant versions of Kleopatra etc.

GnuPG-bug-id: 5801
This commit is contained in:
Werner Koch 2022-01-27 15:13:16 +01:00
parent ed798a97f5
commit f2d1187fcd
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 13 additions and 10 deletions

View File

@ -358,16 +358,14 @@ Outputs additional information while running.
You can increase the verbosity by giving several
verbose commands to @command{gpgsm}, such as @samp{-vv}.
@item --ldapserver @var{string}
@itemx --keyserver @var{string}
@opindex ldapserver
@item --keyserver @var{string}
@opindex keyserver
Add an LDAP server to use for X.509 certificate and CRL lookup. This
option can be given multiple times to configure more than one LDAP
server. Note that in general @command{dirmngr} should be configured
with the list of LDAP servers; if this option is also configured here,
it is used in addition to those configured in dirmngr. For the syntax
see the description of dirmngr's ldapserver option.
This is a deprecated option. It was used to add an LDAP server to use
for X.509 certificate and CRL lookup. The alias @option{--ldapserver}
existed from version 2.2.28 to 2.2.33 and 2.3.2 to 2.3.4 but is now
entirely ignored.
LDAP servers must be given in the configuration for @command{dirmngr}.
@item --policy-file @var{filename}
@opindex policy-file

View File

@ -193,6 +193,7 @@ enum cmd_and_opt_values {
oSkipVerify,
oValidationModel,
oKeyServer,
oKeyServer_deprecated,
oEncryptTo,
oNoEncryptTo,
oLoggerFD,
@ -349,7 +350,7 @@ static gpgrt_opt_t opts[] = {
ARGPARSE_s_s (oKeyring, "keyring",
N_("|FILE|add keyring to the list of keyrings")),
ARGPARSE_s_n (oNoDefKeyring, "no-default-keyring", "@"),
ARGPARSE_s_s (oKeyServer, "ldapserver", "@"),
ARGPARSE_s_s (oKeyServer_deprecated, "ldapserver", "@"),
ARGPARSE_s_s (oKeyServer, "keyserver", "@"),
ARGPARSE_s_n (oUseKeyboxd, "use-keyboxd", "@"),
@ -1418,6 +1419,10 @@ main ( int argc, char **argv)
append_to_strlist (&opt.keyserver, pargs.r.ret_str);
break;
case oKeyServer_deprecated:
obsolete_option (configname, pargs.lineno, "ldapserver");
break;
case oIgnoreCertExtension:
add_to_strlist (&opt.ignored_cert_extensions, pargs.r.ret_str);
break;