示例#1
0
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);
}
示例#2
0
文件: winhttp.c 项目: madcup90/myRepo
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);
}
示例#3
0
文件: winhttp.c 项目: madcup90/myRepo
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);
}