Fix default credentials: The WinHttpSetCredentials auth scheme must only be one of the supported schemes.
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c
index 4eb8b42..764ac2f 100644
--- a/src/transports/winhttp.c
+++ b/src/transports/winhttp.c
@@ -184,10 +184,10 @@ static int apply_default_credentials(HINTERNET request, int mechanisms)
DWORD native_scheme = 0;
if ((mechanisms & GIT_WINHTTP_AUTH_NTLM) != 0)
- native_scheme |= WINHTTP_AUTH_SCHEME_NTLM;
+ native_scheme = WINHTTP_AUTH_SCHEME_NTLM;
if ((mechanisms & GIT_WINHTTP_AUTH_NEGOTIATE) != 0)
- native_scheme |= WINHTTP_AUTH_SCHEME_NEGOTIATE;
+ native_scheme = WINHTTP_AUTH_SCHEME_NEGOTIATE;
if (!native_scheme) {
giterr_set(GITERR_NET, "invalid authentication scheme");