secur32: Return ISC_RET_USED_SUPPLIED_CREDS for schannel contexts if the feature was requested.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46127
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e31bc3dbdb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
Hans Leidekker 2019-02-08 09:58:12 +01:00 committed by Michael Stefaniuc
parent e822720a1d
commit 3b03145299
2 changed files with 5 additions and 2 deletions

View File

@ -932,6 +932,8 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
*pfContextAttr |= ISC_RET_ALLOCATED_MEMORY;
if (ctx->req_ctx_attr & ISC_REQ_STREAM)
*pfContextAttr |= ISC_RET_STREAM;
if (ctx->req_ctx_attr & ISC_REQ_USE_SUPPLIED_CREDS)
*pfContextAttr |= ISC_RET_USED_SUPPLIED_CREDS;
return ret;
}

View File

@ -843,7 +843,7 @@ todo_wine
buffers[1].pBuffers[0].cbBuffer = ret;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM|ISC_REQ_USE_SUPPLIED_CREDS,
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size;
while (status == SEC_I_CONTINUE_NEEDED)
@ -860,7 +860,7 @@ todo_wine
buf->BufferType = SECBUFFER_TOKEN;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM|ISC_REQ_USE_SUPPLIED_CREDS,
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size;
}
@ -871,6 +871,7 @@ todo_wine
skip("Handshake failed\n");
return;
}
ok(attrs & (ISC_RET_CONFIDENTIALITY|ISC_RET_STREAM|ISC_RET_USED_SUPPLIED_CREDS), "got %08x\n", attrs);
status = QueryCredentialsAttributesA(&cred_handle, SECPKG_CRED_ATTR_NAMES, &names);
ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", status);