aboutsummaryrefslogtreecommitdiffstats
path: root/http.c
diff options
context:
space:
mode:
authorJorge Lopez Silva <jalopezsilva@gmail.com>2020-03-04 18:40:06 +0000
committerJunio C Hamano <gitster@pobox.com>2020-03-05 12:26:14 -0800
commitaf026519c9cf82928be111974e89bc122765f13f (patch)
tree91f225c9783288a367fabfdccc9bc19f23314d91 /http.c
parent88238e02d545dedd832cec9d9ed4ca877c44da19 (diff)
downloadgit-af026519c9cf82928be111974e89bc122765f13f.tar.gz
http: add environment variable support for HTTPS proxies
Add 4 environment variables that can be used to configure the proxy cert, proxy ssl key, the proxy cert password protected flag, and the CA info for the proxy. Documentation for the options was also updated. Signed-off-by: Jorge Lopez Silva <jalopezsilva@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.c')
-rw-r--r--http.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/http.c b/http.c
index 649ee6c6db..6e804b938d 100644
--- a/http.c
+++ b/http.c
@@ -1211,6 +1211,13 @@ void http_init(struct remote *remote, const char *url, int proactive_auth)
max_requests = DEFAULT_MAX_REQUESTS;
#endif
+ set_from_env(&http_proxy_ssl_cert, "GIT_PROXY_SSL_CERT");
+ set_from_env(&http_proxy_ssl_key, "GIT_PROXY_SSL_KEY");
+ set_from_env(&http_proxy_ssl_ca_info, "GIT_PROXY_SSL_CAINFO");
+
+ if (getenv("GIT_PROXY_SSL_CERT_PASSWORD_PROTECTED"))
+ proxy_ssl_cert_password_required = 1;
+
if (getenv("GIT_CURL_FTP_NO_EPSV"))
curl_ftp_no_epsv = 1;