Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e55bb2bc
Commit
e55bb2bc
authored
Nov 07, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 08, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Add semi-stub for ApplyControlToken (schannel).
parent
ac596879
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
10 deletions
+29
-10
schannel.c
dlls/secur32/schannel.c
+21
-2
schannel.c
dlls/secur32/tests/schannel.c
+8
-8
No files found.
dlls/secur32/schannel.c
View file @
e55bb2bc
...
...
@@ -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 */
...
...
dlls/secur32/tests/schannel.c
View file @
e55bb2bc
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment