Skip to content

Commit 9cbb247

Browse files
committed
http: set the proxy SSL options, if compiling with a new-enough libcurl
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]>
1 parent e219204 commit 9cbb247

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

git-curl-compat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
*/
101101
#if LIBCURL_VERSION_NUM >= 0x073400
102102
#define GIT_CURL_HAVE_CURLOPT_PROXY_CAINFO 1
103+
#define GIT_CURL_HAVE_CURLOPT_PROXY_SSL_OPTIONS 1
103104
#endif
104105

105106
/**

http.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,8 +1028,12 @@ static CURL *get_curl_handle(void)
10281028
#endif
10291029
}
10301030

1031-
if (ssl_options)
1031+
if (ssl_options) {
10321032
curl_easy_setopt(result, CURLOPT_SSL_OPTIONS, ssl_options);
1033+
#ifdef GIT_CURL_HAVE_CURLOPT_PROXY_SSL_OPTIONS
1034+
curl_easy_setopt(result, CURLOPT_PROXY_SSL_OPTIONS, ssl_options);
1035+
#endif
1036+
}
10331037
}
10341038

10351039
if (http_proactive_auth)

0 commit comments

Comments
 (0)