[git] GnuPG - branch, master, updated. gnupg-2.1.0-67-g5bf93f4
by Werner Koch
cvs at cvs.gnupg.org
Mon Dec 8 15:16:39 CET 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 5bf93f4ea7a11381dd256b5fd4e5913366828265 (commit)
from cdc404fe5247fb9886a7aeb9f214a04fc88b7aa0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5bf93f4ea7a11381dd256b5fd4e5913366828265
Author: Werner Koch <wk at gnupg.org>
Date: Mon Dec 8 15:14:35 2014 +0100
gpg: Obsolete some keyserver helper options.
* g10/options.h (opt): Remove keyserver_options.other.
* g10/gpg.c (main): Obsolete option --honor-http-proxt.
* g10/keyserver.c (add_canonical_option): Replace by ...
(warn_kshelper_option): New.
(parse_keyserver_uri): Obsolete "x-broken-http".
--
Some of these options are deprecated for 10 years and they do not make
any sense without the keyserver helpers. For one we print a hint on
how to replace it:
gpg: keyserver option 'ca-cert-file' is obsolete; \
please use 'hkp-cacert' in dirmngr.conf
Signed-off-by: Werner Koch <wk at gnupg.org>
diff --git a/g10/gpg.c b/g10/gpg.c
index 0bedf25..12fe7b2 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -702,7 +702,6 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_n (oNoAllowFreeformUID, "no-allow-freeform-uid", "@"),
ARGPARSE_s_n (oNoLiteral, "no-literal", "@"),
ARGPARSE_p_u (oSetFilesize, "set-filesize", "@"),
- ARGPARSE_s_n (oHonorHttpProxy, "honor-http-proxy", "@"),
ARGPARSE_s_n (oFastListMode, "fast-list-mode", "@"),
ARGPARSE_s_n (oFixedListMode, "fixed-list-mode", "@"),
ARGPARSE_s_n (oLegacyListMode, "legacy-list-mode", "@"),
@@ -794,6 +793,7 @@ static ARGPARSE_OPTS opts[] = {
ARGPARSE_s_s (octapiDriver, "ctapi-driver", "@"),
ARGPARSE_s_s (opcscDriver, "pcsc-driver", "@"),
ARGPARSE_s_n (oDisableCCID, "disable-ccid", "@"),
+ ARGPARSE_s_n (oHonorHttpProxy, "honor-http-proxy", "@"),
/* Dummy options. */
ARGPARSE_s_n (oNoop, "sk-comments", "@"),
@@ -2375,6 +2375,9 @@ main (int argc, char **argv)
case oDisableCCID:
obsolete_scdaemon_option (configname, configlineno, "disable-ccid");
break;
+ case oHonorHttpProxy:
+ obsolete_option (configname, configlineno, "honor-http-proxy");
+ break;
case oAnswerYes: opt.answer_yes = 1; break;
case oAnswerNo: opt.answer_no = 1; break;
@@ -2940,12 +2943,6 @@ main (int argc, char **argv)
case oNoAllowFreeformUID: opt.allow_freeform_uid = 0; break;
case oNoLiteral: opt.no_literal = 1; break;
case oSetFilesize: opt.set_filesize = pargs.r.ret_ulong; break;
- case oHonorHttpProxy:
- add_to_strlist(&opt.keyserver_options.other,"http-proxy");
- deprecated_warning(configname,configlineno,
- "--honor-http-proxy",
- "--keyserver-options ","http-proxy");
- break;
case oFastListMode: opt.fast_list_mode = 1; break;
case oFixedListMode: /* Dummy */ break;
case oLegacyListMode: opt.legacy_list_mode = 1; break;
diff --git a/g10/keyserver.c b/g10/keyserver.c
index 6b603cd..a92544c 100644
--- a/g10/keyserver.c
+++ b/g10/keyserver.c
@@ -124,26 +124,23 @@ static gpg_error_t keyserver_put (ctrl_t ctrl, strlist_t keyspecs,
static size_t max_cert_size=DEFAULT_MAX_CERT_SIZE;
static void
-add_canonical_option(char *option,strlist_t *list)
+warn_kshelper_option(char *option)
{
- char *arg=argsplit(option);
-
- if(arg)
- {
- char *joined;
-
- joined=xmalloc(strlen(option)+1+strlen(arg)+1);
- /* Make a canonical name=value form with no spaces */
- strcpy(joined,option);
- strcat(joined,"=");
- strcat(joined,arg);
- append_to_strlist(list,joined);
- xfree(joined);
- }
- else
- append_to_strlist(list,option);
+ char *p;
+
+ if ((p=strchr (option, '=')))
+ *p = 0;
+
+ if (!strcmp (option, "ca-cert-file"))
+ log_info ("keyserver option '%s' is obsolete; please use "
+ "'%s' in dirmngr.conf\n",
+ "ca-cert-file", "hkp-cacert");
+ else if (!strcmp (option, "check-cert")
+ || !strcmp (option, "broken-http-proxy"))
+ log_info ("keyserver option '%s' is obsolete\n", option);
}
+
int
parse_keyserver_options(char *options)
{
@@ -190,9 +187,9 @@ parse_keyserver_options(char *options)
&& !parse_export_options(tok,
&opt.keyserver_options.export_options,0))
{
- /* All of the standard options have failed, so the option is
- destined for a keyserver plugin. */
- add_canonical_option(tok,&opt.keyserver_options.other);
+ /* All of the standard options have failed, so the option was
+ destined for a keyserver plugin as used by GnuPG < 2.1 */
+ warn_kshelper_option (tok);
}
}
@@ -285,7 +282,7 @@ parse_keyserver_uri (const char *string,int require_scheme,
options++;
while((tok=optsep(&options)))
- add_canonical_option(tok,&keyserver->options);
+ warn_kshelper_option (tok);
}
/* Get the scheme */
@@ -344,11 +341,8 @@ parse_keyserver_uri (const char *string,int require_scheme,
if(ascii_strcasecmp(keyserver->scheme,"x-broken-hkp")==0)
{
- deprecated_warning(configname,configlineno,"x-broken-hkp",
- "--keyserver-options ","broken-http-proxy");
- xfree(keyserver->scheme);
- keyserver->scheme=xstrdup("hkp");
- append_to_strlist(&opt.keyserver_options.other,"broken-http-proxy");
+ log_info ("keyserver option '%s' is obsolete\n",
+ "x-broken-hkp");
}
else if(ascii_strcasecmp(keyserver->scheme,"x-hkp")==0)
{
diff --git a/g10/options.h b/g10/options.h
index 9aadb42..7b9f366 100644
--- a/g10/options.h
+++ b/g10/options.h
@@ -146,7 +146,6 @@ struct
unsigned int options;
unsigned int import_options;
unsigned int export_options;
- strlist_t other;
} keyserver_options;
int exec_disable;
int exec_path_set;
-----------------------------------------------------------------------
Summary of changes:
g10/gpg.c | 11 ++++-------
g10/keyserver.c | 46 ++++++++++++++++++++--------------------------
g10/options.h | 1 -
3 files changed, 24 insertions(+), 34 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list