From c4d98734c5df39f57a71f0ec1c0c80e82ff08508 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 21 Apr 2015 19:29:53 +0200 Subject: gpg: Make keyserver-option http_proxy work. * g10/options.h (opt): Add field keyserver_options.http_proxy. * g10/keyserver.c (warn_kshelper_option): Add arg noisy. (parse_keyserver_options): Parse into new http_proxy field. * g10/call-dirmngr.c (create_context): Send the http-proxy option. --- g10/call-dirmngr.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'g10/call-dirmngr.c') diff --git a/g10/call-dirmngr.c b/g10/call-dirmngr.c index 26955abbf..bb571b2e9 100644 --- a/g10/call-dirmngr.c +++ b/g10/call-dirmngr.c @@ -148,9 +148,24 @@ create_context (ctrl_t ctrl, assuan_context_t *r_ctx) } else if (!err) { + char *line; + /* Tell the dirmngr that we want to collect audit event. */ /* err = assuan_transact (agent_ctx, "OPTION audit-events=1", */ /* NULL, NULL, NULL, NULL, NULL, NULL); */ + if (opt.keyserver_options.http_proxy) + { + line = xtryasprintf ("OPTION http-proxy=%s", + opt.keyserver_options.http_proxy); + if (!line) + err = gpg_error_from_syserror (); + else + { + err = assuan_transact (ctx, line, NULL, NULL, NULL, + NULL, NULL, NULL); + xfree (line); + } + } } if (err) -- cgit v1.2.3