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
12191017
Commit
12191017
authored
Apr 21, 2021
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32/tests: Add a Kerberos ticket cache test.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
30e07109
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
secur32.c
dlls/secur32/tests/secur32.c
+35
-0
No files found.
dlls/secur32/tests/secur32.c
View file @
12191017
...
...
@@ -29,6 +29,8 @@
#include <schannel.h>
#include <wincred.h>
#include <winsock2.h>
#include <ntsecapi.h>
#include <winternl.h>
#include "wine/test.h"
...
...
@@ -464,6 +466,38 @@ static void test_kerberos(void)
FreeCredentialHandle
(
&
cred
);
}
static
void
test_ticket_cache
(
void
)
{
KERB_QUERY_TKT_CACHE_REQUEST
req
=
{
KerbQueryTicketCacheMessage
};
KERB_QUERY_TKT_CACHE_RESPONSE
*
resp
;
NTSTATUS
status
;
HANDLE
lsa
;
ULONG
package
,
len
,
i
;
LSA_STRING
name
;
status
=
LsaConnectUntrusted
(
&
lsa
);
ok
(
!
status
,
"got %08x
\n
"
,
status
);
RtlInitAnsiString
(
&
name
,
MICROSOFT_KERBEROS_NAME_A
);
status
=
LsaLookupAuthenticationPackage
(
lsa
,
&
name
,
&
package
);
ok
(
!
status
,
"got %08x
\n
"
,
status
);
status
=
LsaCallAuthenticationPackage
(
lsa
,
package
,
&
req
,
sizeof
(
req
),
(
void
**
)
&
resp
,
&
len
,
&
status
);
ok
(
!
status
,
"got %08x
\n
"
,
status
);
ok
(
resp
->
MessageType
==
KerbQueryTicketCacheMessage
,
"got %u
\n
"
,
resp
->
MessageType
);
for
(
i
=
0
;
i
<
resp
->
CountOfTickets
;
i
++
)
{
KERB_TICKET_CACHE_INFO
*
info
=
&
resp
->
Tickets
[
i
];
trace
(
"ServerName %s
\n
"
,
wine_dbgstr_wn
(
info
->
ServerName
.
Buffer
,
info
->
ServerName
.
Length
/
sizeof
(
WCHAR
))
);
trace
(
"RealmName %s
\n
"
,
wine_dbgstr_wn
(
info
->
RealmName
.
Buffer
,
info
->
RealmName
.
Length
/
sizeof
(
WCHAR
))
);
trace
(
"EncryptionType %08x
\n
"
,
info
->
EncryptionType
);
trace
(
"TicketFlags %08x
\n
"
,
info
->
TicketFlags
);
}
LsaFreeReturnBuffer
(
resp
);
LsaDeregisterLogonProcess
(
lsa
);
}
START_TEST
(
secur32
)
{
secdll
=
LoadLibraryA
(
"secur32.dll"
);
...
...
@@ -514,4 +548,5 @@ START_TEST(secur32)
}
test_kerberos
();
test_ticket_cache
();
}
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