Skip to content

Commit

Permalink
http: set the proxy SSL options, if compiling with a new-enough libcurl
Browse files Browse the repository at this point in the history
As of v7.52.0, libcurl allows to specify not only the SSL options for
the actual HTTPS connection, but also for the HTTPS proxy (if any).

Let's do that.

This _may_ address git-for-windows#4467.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Jul 7, 2023
1 parent e219204 commit 9cbb247
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions git-curl-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
*/
#if LIBCURL_VERSION_NUM >= 0x073400
#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1
#define GIT_CURL_HAVE_CURLOPT_PROXY_SSL_OPTIONS 1
#endif

/**
Expand Down
6 changes: 5 additions & 1 deletion http.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,8 +1028,12 @@ static CURL *get_curl_handle(void)
#endif
}

if (ssl_options)
if (ssl_options) {
curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, ssl_options);
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_SSL_OPTIONS
curl_easy_setopt(result, CURLOPT_PROXY_SSL_OPTIONS, ssl_options);
#endif
}
}

if (http_proactive_auth)
Expand Down

0 comments on commit 9cbb247

Please sign in to comment.