mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Fix proxy with TLS.
* dirmngr/http.c (proxy_get_token, run_proxy_connect): Always available regardless of USE_TLS. (run_proxy_connect): Use log_debug_string. (send_request): Remove USE_TLS. -- Since the commit of 1009e4e5f71347a1fe194e59a9d88c8034a67016 Building with TLS library is mandatory. GnuPG-bug-id: 6997 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
302afcb6f6
commit
04cbc3074a
@ -2362,7 +2362,6 @@ run_gnutls_handshake (http_t hd, const char *server)
|
|||||||
* NULL, decode the string and use this as input from teh server. On
|
* NULL, decode the string and use this as input from teh server. On
|
||||||
* success the final output token is stored at PROXY->OUTTOKEN and
|
* success the final output token is stored at PROXY->OUTTOKEN and
|
||||||
* OUTTOKLEN. IF the authentication succeeded OUTTOKLEN is zero. */
|
* OUTTOKLEN. IF the authentication succeeded OUTTOKLEN is zero. */
|
||||||
#ifdef USE_TLS
|
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
proxy_get_token (proxy_info_t proxy, const char *inputstring)
|
proxy_get_token (proxy_info_t proxy, const char *inputstring)
|
||||||
{
|
{
|
||||||
@ -2530,11 +2529,9 @@ proxy_get_token (proxy_info_t proxy, const char *inputstring)
|
|||||||
|
|
||||||
#endif /*!HAVE_W32_SYSTEM*/
|
#endif /*!HAVE_W32_SYSTEM*/
|
||||||
}
|
}
|
||||||
#endif /*USE_TLS*/
|
|
||||||
|
|
||||||
|
|
||||||
/* Use the CONNECT method to proxy our TLS stream. */
|
/* Use the CONNECT method to proxy our TLS stream. */
|
||||||
#ifdef USE_TLS
|
|
||||||
static gpg_error_t
|
static gpg_error_t
|
||||||
run_proxy_connect (http_t hd, proxy_info_t proxy,
|
run_proxy_connect (http_t hd, proxy_info_t proxy,
|
||||||
const char *httphost, const char *server,
|
const char *httphost, const char *server,
|
||||||
@ -2586,7 +2583,7 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
|
|||||||
hd->keep_alive = !auth_basic; /* We may need to send more requests. */
|
hd->keep_alive = !auth_basic; /* We may need to send more requests. */
|
||||||
|
|
||||||
if (opt_debug || (hd->flags & HTTP_FLAG_LOG_RESP))
|
if (opt_debug || (hd->flags & HTTP_FLAG_LOG_RESP))
|
||||||
log_debug_with_string (request, "http.c:proxy:request:");
|
log_debug_string (request, "http.c:proxy:request:");
|
||||||
|
|
||||||
if (!hd->fp_write)
|
if (!hd->fp_write)
|
||||||
{
|
{
|
||||||
@ -2743,7 +2740,6 @@ run_proxy_connect (http_t hd, proxy_info_t proxy,
|
|||||||
xfree (tmpstr);
|
xfree (tmpstr);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
#endif /*USE_TLS*/
|
|
||||||
|
|
||||||
|
|
||||||
/* Make a request string using a standard proxy. On success the
|
/* Make a request string using a standard proxy. On success the
|
||||||
@ -2903,7 +2899,6 @@ send_request (ctrl_t ctrl,
|
|||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_TLS
|
|
||||||
if (use_http_proxy && hd->uri->use_tls)
|
if (use_http_proxy && hd->uri->use_tls)
|
||||||
{
|
{
|
||||||
err = run_proxy_connect (hd, proxy, httphost, server, port);
|
err = run_proxy_connect (hd, proxy, httphost, server, port);
|
||||||
@ -2915,7 +2910,6 @@ send_request (ctrl_t ctrl,
|
|||||||
* clear the flag to indicate this. */
|
* clear the flag to indicate this. */
|
||||||
use_http_proxy = 0;
|
use_http_proxy = 0;
|
||||||
}
|
}
|
||||||
#endif /* USE_TLS */
|
|
||||||
|
|
||||||
#if HTTP_USE_NTBTLS
|
#if HTTP_USE_NTBTLS
|
||||||
err = run_ntbtls_handshake (hd);
|
err = run_ntbtls_handshake (hd);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user