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>
This commit is contained in:
Hans Leidekker 2019-02-08 09:58:12 +01:00 committed by Alexandre Julliard
parent 9d92acaa56
commit e31bc3dbdb
2 changed files with 5 additions and 2 deletions

View File

@ -926,6 +926,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);