MCPcopy Index your code
hub / github.com/git/git / init_curl_proxy_auth

Function init_curl_proxy_auth

http.c:707–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705}
706
707static void init_curl_proxy_auth(CURL *result)
708{
709 if (proxy_auth.username) {
710 if (!proxy_auth.password && !proxy_auth.credential)
711 credential_fill(the_repository, &proxy_auth, 1);
712 set_proxyauth_name_password(result);
713 }
714
715 var_override(&http_proxy_authmethod, getenv("GIT_HTTP_PROXY_AUTHMETHOD"));
716
717 if (http_proxy_authmethod) {
718 int i;
719 for (i = 0; i < ARRAY_SIZE(proxy_authmethods); i++) {
720 if (!strcmp(http_proxy_authmethod, proxy_authmethods[i].name)) {
721 curl_easy_setopt(result, CURLOPT_PROXYAUTH,
722 proxy_authmethods[i].curlauth_param);
723 break;
724 }
725 }
726 if (i == ARRAY_SIZE(proxy_authmethods)) {
727 warning("unsupported proxy authentication method %s: using anyauth",
728 http_proxy_authmethod);
729 curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
730 }
731 }
732 else
733 curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
734}
735
736static int has_cert_password(void)
737{

Callers 1

get_curl_handleFunction · 0.85

Calls 4

credential_fillFunction · 0.85
var_overrideFunction · 0.85
warningFunction · 0.85

Tested by

no test coverage detected