static int apply_userpass_credential_proxy(HINTERNET request, git_cred *cred, int mechanisms) { if (GIT_WINHTTP_AUTH_DIGEST & mechanisms) { return _apply_userpass_credential(request, WINHTTP_AUTH_TARGET_PROXY, WINHTTP_AUTH_SCHEME_DIGEST, cred); } return _apply_userpass_credential(request, WINHTTP_AUTH_TARGET_PROXY, WINHTTP_AUTH_SCHEME_BASIC, cred); }
static int apply_userpass_credential(HINTERNET request, int mechanisms, git_cred *cred) { DWORD native_scheme; if ((mechanisms & GIT_WINHTTP_AUTH_NTLM) || (mechanisms & GIT_WINHTTP_AUTH_NEGOTIATE)) { native_scheme = WINHTTP_AUTH_SCHEME_NTLM; } else if (mechanisms & GIT_WINHTTP_AUTH_BASIC) { native_scheme = WINHTTP_AUTH_SCHEME_BASIC; } else { giterr_set(GITERR_NET, "invalid authentication scheme"); return -1; } return _apply_userpass_credential(request, WINHTTP_AUTH_TARGET_SERVER, native_scheme, cred); }
static int apply_userpass_credential_proxy(HINTERNET request, git_cred *cred) { return _apply_userpass_credential(request, WINHTTP_AUTH_TARGET_PROXY, WINHTTP_AUTH_SCHEME_BASIC, cred); }