Commit e31bc3db authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 9d92acaa
...@@ -926,6 +926,8 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW( ...@@ -926,6 +926,8 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
*pfContextAttr |= ISC_RET_ALLOCATED_MEMORY; *pfContextAttr |= ISC_RET_ALLOCATED_MEMORY;
if (ctx->req_ctx_attr & ISC_REQ_STREAM) if (ctx->req_ctx_attr & ISC_REQ_STREAM)
*pfContextAttr |= ISC_RET_STREAM; *pfContextAttr |= ISC_RET_STREAM;
if (ctx->req_ctx_attr & ISC_REQ_USE_SUPPLIED_CREDS)
*pfContextAttr |= ISC_RET_USED_SUPPLIED_CREDS;
return ret; return ret;
} }
......
...@@ -843,7 +843,7 @@ todo_wine ...@@ -843,7 +843,7 @@ todo_wine
buffers[1].pBuffers[0].cbBuffer = ret; buffers[1].pBuffers[0].cbBuffer = ret;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", 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); 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size; buffers[1].pBuffers[0].cbBuffer = buf_size;
while (status == SEC_I_CONTINUE_NEEDED) while (status == SEC_I_CONTINUE_NEEDED)
...@@ -860,7 +860,7 @@ todo_wine ...@@ -860,7 +860,7 @@ todo_wine
buf->BufferType = SECBUFFER_TOKEN; buf->BufferType = SECBUFFER_TOKEN;
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost", 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); 0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size; buffers[1].pBuffers[0].cbBuffer = buf_size;
} }
...@@ -871,6 +871,7 @@ todo_wine ...@@ -871,6 +871,7 @@ todo_wine
skip("Handshake failed\n"); skip("Handshake failed\n");
return; 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); 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); ok(status == SEC_E_NO_CREDENTIALS || status == SEC_E_UNSUPPORTED_FUNCTION /* before Vista */, "expected SEC_E_NO_CREDENTIALS, got %08x\n", status);
......
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