mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 08:33:37 +00:00
secur32: Add semi-stub for ApplyControlToken (schannel).
This commit is contained in:
parent
ac5968790a
commit
e55bb2bc71
|
@ -1573,6 +1573,25 @@ static SECURITY_STATUS SEC_ENTRY schan_DeleteSecurityContext(PCtxtHandle context
|
|||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
static SECURITY_STATUS SEC_ENTRY schan_ApplyControlToken(PCtxtHandle context_handle, PSecBufferDesc input)
|
||||
{
|
||||
TRACE("%p %p\n", context_handle, input);
|
||||
|
||||
dump_buffer_desc(input);
|
||||
|
||||
if (!context_handle) return SEC_E_INVALID_HANDLE;
|
||||
if (!input) return SEC_E_INTERNAL_ERROR;
|
||||
|
||||
if (input->cBuffers != 1) return SEC_E_INVALID_TOKEN;
|
||||
if (input->pBuffers[0].BufferType != SECBUFFER_TOKEN) return SEC_E_INVALID_TOKEN;
|
||||
if (input->pBuffers[0].cbBuffer < sizeof(DWORD)) return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
if (*(DWORD *)input->pBuffers[0].pvBuffer != SCHANNEL_SHUTDOWN) return SEC_E_UNSUPPORTED_FUNCTION;
|
||||
|
||||
FIXME("stub.\n");
|
||||
|
||||
return SEC_E_OK;
|
||||
}
|
||||
|
||||
static const SecurityFunctionTableA schanTableA = {
|
||||
1,
|
||||
NULL, /* EnumerateSecurityPackagesA */
|
||||
|
@ -1584,7 +1603,7 @@ static const SecurityFunctionTableA schanTableA = {
|
|||
NULL, /* AcceptSecurityContext */
|
||||
NULL, /* CompleteAuthToken */
|
||||
schan_DeleteSecurityContext,
|
||||
NULL, /* ApplyControlToken */
|
||||
schan_ApplyControlToken, /* ApplyControlToken */
|
||||
schan_QueryContextAttributesA,
|
||||
NULL, /* ImpersonateSecurityContext */
|
||||
NULL, /* RevertSecurityContext */
|
||||
|
@ -1615,7 +1634,7 @@ static const SecurityFunctionTableW schanTableW = {
|
|||
NULL, /* AcceptSecurityContext */
|
||||
NULL, /* CompleteAuthToken */
|
||||
schan_DeleteSecurityContext,
|
||||
NULL, /* ApplyControlToken */
|
||||
schan_ApplyControlToken, /* ApplyControlToken */
|
||||
schan_QueryContextAttributesW,
|
||||
NULL, /* ImpersonateSecurityContext */
|
||||
NULL, /* RevertSecurityContext */
|
||||
|
|
|
@ -1824,12 +1824,12 @@ static void test_connection_shutdown(void)
|
|||
buffers[0].pBuffers[1] = buffers[0].pBuffers[0];
|
||||
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
|
||||
buffers[0].pBuffers[1].cbBuffer = 0;
|
||||
buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY;
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
|
||||
*(DWORD *)buf->pvBuffer = SCHANNEL_RENEGOTIATE;
|
||||
buffers[0].cBuffers = 1;
|
||||
|
@ -1840,16 +1840,16 @@ static void test_connection_shutdown(void)
|
|||
ok( status == SEC_E_INVALID_HANDLE, "got %08lx.\n", status );
|
||||
|
||||
status = ApplyControlToken( &context, NULL );
|
||||
todo_wine ok( status == SEC_E_INTERNAL_ERROR, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_INTERNAL_ERROR, "got %08lx.\n", status );
|
||||
|
||||
*(DWORD *)buf->pvBuffer = SCHANNEL_SHUTDOWN;
|
||||
|
||||
buf->BufferType = SECBUFFER_ALERT;
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
buf->BufferType = SECBUFFER_DATA;
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_INVALID_TOKEN, "got %08lx.\n", status );
|
||||
|
||||
buf->BufferType = SECBUFFER_TOKEN;
|
||||
|
||||
|
@ -1859,10 +1859,10 @@ static void test_connection_shutdown(void)
|
|||
|
||||
buf->cbBuffer = sizeof(DWORD) + 1;
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
|
||||
buf->cbBuffer = 1000;
|
||||
buf->BufferType = SECBUFFER_TOKEN;
|
||||
|
@ -1891,7 +1891,7 @@ static void test_connection_shutdown(void)
|
|||
*(DWORD *)buf->pvBuffer = SCHANNEL_SHUTDOWN;
|
||||
buf->BufferType = SECBUFFER_TOKEN;
|
||||
status = ApplyControlToken( &context, buffers );
|
||||
todo_wine ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
ok( status == SEC_E_OK, "got %08lx.\n", status );
|
||||
|
||||
buf->cbBuffer = 1000;
|
||||
status = InitializeSecurityContextA( &cred_handle, &context, NULL, 0, 0, 0,
|
||||
|
|
Loading…
Reference in a new issue