[PATCH gnupg] dirmngr: Fix 302 redirections when using hkps.
Damien Goutte-Gattat
dgouttegattat at incenp.org
Sat Jun 8 22:24:18 CEST 2019
* dirmngr/ks-engine-hkp.c (send_request): Reinitialize HTTP session
when following a redirection.
GnuPG-bug-id: 4566
Signed-off-by: Damien Goutte-Gattat <dgouttegattat at incenp.org>
---
dirmngr/ks-engine-hkp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index 0a360f09f..55c9c255d 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -1217,6 +1217,7 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr,
/* FIXME: I am not sure whey we allow a downgrade for hkp requests.
* Needs at least an explanation here.. */
+ once_more:
err = http_session_new (&session, httphost,
((ctrl->http_no_crl? HTTP_FLAG_NO_CRL : 0)
| HTTP_FLAG_TRUST_DEF),
@@ -1226,7 +1227,6 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr,
http_session_set_log_cb (session, cert_log_cb);
http_session_set_timeout (session, ctrl->timeout);
- once_more:
err = http_open (ctrl, &http,
post_cb? HTTP_REQ_POST : HTTP_REQ_GET,
request,
@@ -1306,6 +1306,7 @@ send_request (ctrl_t ctrl, const char *request, const char *hostportstr,
request = request_buffer;
http_close (http, 0);
http = NULL;
+ http_session_release (session);
}
goto once_more;
--
2.14.5
More information about the Gnupg-devel
mailing list