aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/http.c
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-07-19 09:07:59 +0000
committerJustus Winter <[email protected]>2017-07-19 10:14:27 +0000
commit1ba220e68149fdb197accf4a15b0a11126c8b431 (patch)
tree1de7c463a9fd9840c1cde0ee69b993052e24d6d4 /dirmngr/http.c
parentdirmngr: Fix connecting to http proxies. (diff)
downloadgnupg-1ba220e68149fdb197accf4a15b0a11126c8b431.tar.gz
gnupg-1ba220e68149fdb197accf4a15b0a11126c8b431.zip
dirmngr: Amend TLS handling.
* dirmngr/http.c (http_wait_response): Get the 'use_tls' flag from the write cookie, not from the URI. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r--dirmngr/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index b63beb6df..29854b59e 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -1064,6 +1064,7 @@ http_wait_response (http_t hd)
{
gpg_error_t err;
cookie_t cookie;
+ int use_tls;
/* Make sure that we are in the data. */
http_start_data (hd);
@@ -1074,6 +1075,7 @@ http_wait_response (http_t hd)
if (!cookie)
return gpg_err_make (default_errsource, GPG_ERR_INTERNAL);
+ use_tls = cookie->use_tls;
es_fclose (hd->fp_write);
hd->fp_write = NULL;
/* The close has released the cookie and thus we better set it to NULL. */
@@ -1092,7 +1094,7 @@ http_wait_response (http_t hd)
return gpg_err_make (default_errsource, gpg_err_code_from_syserror ());
cookie->sock = my_socket_ref (hd->sock);
cookie->session = http_session_ref (hd->session);
- cookie->use_tls = hd->uri->use_tls;
+ cookie->use_tls = use_tls;
hd->read_cookie = cookie;
hd->fp_read = es_fopencookie (cookie, "r", cookie_functions);