Commit 7b94871c authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

wininet: Pass context to InitializeSecurityContext in second parameter.

Otherwise, the call will now fail with SEC_E_INVALID_HANDLE.
parent 34556854
...@@ -426,6 +426,7 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue ...@@ -426,6 +426,7 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue
struct HttpAuthInfo *pAuthInfo = lpwhr->pAuthInfo; struct HttpAuthInfo *pAuthInfo = lpwhr->pAuthInfo;
LPWSTR password = lpwhr->lpHttpSession->lpszPassword; LPWSTR password = lpwhr->lpHttpSession->lpszPassword;
LPWSTR domain_and_username = lpwhr->lpHttpSession->lpszUserName; LPWSTR domain_and_username = lpwhr->lpHttpSession->lpszUserName;
BOOL first = FALSE;
TRACE("%s\n", debugstr_w(pszAuthValue)); TRACE("%s\n", debugstr_w(pszAuthValue));
...@@ -435,6 +436,7 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue ...@@ -435,6 +436,7 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue
{ {
TimeStamp exp; TimeStamp exp;
first = TRUE;
pAuthInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*pAuthInfo)); pAuthInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(*pAuthInfo));
if (!pAuthInfo) if (!pAuthInfo)
return FALSE; return FALSE;
...@@ -561,7 +563,8 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue ...@@ -561,7 +563,8 @@ static BOOL HTTP_DoAuthorization( LPWININETHTTPREQW lpwhr, LPCWSTR pszAuthValue
out_desc.cBuffers = 1; out_desc.cBuffers = 1;
out_desc.pBuffers = &out; out_desc.pBuffers = &out;
sec_status = InitializeSecurityContextW(&pAuthInfo->cred, NULL, NULL, sec_status = InitializeSecurityContextW(first ? &pAuthInfo->cred : NULL,
first ? NULL : &pAuthInfo->ctx, NULL,
context_req, 0, SECURITY_NETWORK_DREP, context_req, 0, SECURITY_NETWORK_DREP,
in.pvBuffer ? &in_desc : NULL, in.pvBuffer ? &in_desc : NULL,
0, &pAuthInfo->ctx, &out_desc, 0, &pAuthInfo->ctx, &out_desc,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment