diff options
author | Werner Koch <[email protected]> | 2015-04-21 17:29:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-04-21 17:29:53 +0000 |
commit | c4d98734c5df39f57a71f0ec1c0c80e82ff08508 (patch) | |
tree | 1f29ec2bd39bdb5bc1e4b6a38ba95b87072546a8 /g10/call-dirmngr.c | |
parent | common: Make proper use of http proxy parameter. (diff) | |
download | gnupg-c4d98734c5df39f57a71f0ec1c0c80e82ff08508.tar.gz gnupg-c4d98734c5df39f57a71f0ec1c0c80e82ff08508.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | g10/call-dirmngr.c | 15 |
1 files changed, 15 insertions, 0 deletions
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) |