From 372370f1675c2b935fb703665358dd5567641107 Mon Sep 17 00:00:00 2001 From: Knut Franke Date: Tue, 26 Jan 2016 13:02:48 +0000 Subject: http: use credential API to handle proxy authentication Currently, the only way to pass proxy credentials to curl is by including them in the proxy URL. Usually, this means they will end up on disk unencrypted, one way or another (by inclusion in ~/.gitconfig, shell profile or history). Since proxy authentication often uses a domain user, credentials can be security sensitive; therefore, a safer way of passing credentials is desirable. If the configured proxy contains a username but not a password, query the credential API for one. Also, make sure we approve/reject proxy credentials properly. For consistency reasons, add parsing of http_proxy/https_proxy/all_proxy environment variables, which would otherwise be evaluated as a fallback by curl. Without this, we would have different semantics for git configuration and environment variables. Helped-by: Junio C Hamano Helped-by: Eric Sunshine Helped-by: Elia Pinto Signed-off-by: Knut Franke Signed-off-by: Elia Pinto Signed-off-by: Junio C Hamano --- http.h | 1 + 1 file changed, 1 insertion(+) (limited to 'http.h') diff --git a/http.h b/http.h index 4f97b60b5c..f83cfa6868 100644 --- a/http.h +++ b/http.h @@ -54,6 +54,7 @@ struct slot_results { CURLcode curl_result; long http_code; long auth_avail; + long http_connectcode; }; struct active_request_slot { -- cgit v1.2.3