On Fri, Feb 21, 2020 at 4:37 PM Jorge Lopez Silva via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote: > Git currently supports performing connections to HTTPS proxies but we > don't support doing mutual authentication with them (through TLS). This > commit adds the necessary options to be able to send a client > certificate to the HTTPS proxy. > [...] > Signed-off-by: Jorge Lopez Silva <jalopezsilva@xxxxxxxxx> > --- > diff --git a/http.c b/http.c > @@ -1018,9 +1046,23 @@ static CURL *get_curl_handle(void) > #if LIBCURL_VERSION_NUM >= 0x073400 > - else if (starts_with(curl_http_proxy, "https")) > + else if (starts_with(curl_http_proxy, "https")) { > curl_easy_setopt(result, > CURLOPT_PROXYTYPE, CURLPROXY_HTTPS); > + > + if (http_proxy_ssl_cert != NULL) { > + curl_easy_setopt(result, > + CURLOPT_PROXY_SSLCERT, http_proxy_ssl_cert); > + } > + if (http_proxy_ssl_key != NULL) { > + curl_easy_setopt(result, > + CURLOPT_PROXY_SSLKEY, http_proxy_ssl_key); > + } > + if (http_proxy_ssl_key_passwd != NULL) { > + curl_easy_setopt(result, > + CURLOPT_PROXY_KEYPASSWD, http_proxy_ssl_key_passwd); > + } > + } > #endif All the closing braces in this hunk seem to be over-indented. Also, all of the braces for the one-liner 'if' bodies can be dropped, thus making it less noisy.