Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c77b23a3
Commit
c77b23a3
authored
Jul 08, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32/tests: Add more context attributes tests.
parent
0167c0bc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
17 deletions
+31
-17
ntlm.c
dlls/secur32/tests/ntlm.c
+31
-17
No files found.
dlls/secur32/tests/ntlm.c
View file @
c77b23a3
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <rpc.h>
#include <rpc.h>
#include <rpcdce.h>
#include <rpcdce.h>
#include <secext.h>
#include <secext.h>
#include <wincrypt.h>
#include "wine/test.h"
#include "wine/test.h"
...
@@ -819,8 +820,10 @@ static void testAuth(ULONG data_rep, BOOL fake)
...
@@ -819,8 +820,10 @@ static void testAuth(ULONG data_rep, BOOL fake)
BOOL
first
=
TRUE
;
BOOL
first
=
TRUE
;
SspiData
client
=
{{
0
}},
server
=
{{
0
}};
SspiData
client
=
{{
0
}},
server
=
{{
0
}};
SEC_WINNT_AUTH_IDENTITY_A
id
;
SEC_WINNT_AUTH_IDENTITY_A
id
;
SecPkgContext_Sizes
ctxt_sizes
;
SecPkgContext_Sizes
sizes
;
SecPkgContext_StreamSizes
stream_sizes
;
SecPkgContext_NegotiationInfoA
info
;
SecPkgContext_NegotiationInfoA
info
;
SecPkgContext_KeyInfoA
key
;
SecPkgInfoA
*
pi
;
SecPkgInfoA
*
pi
;
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!=
SEC_E_OK
)
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!=
SEC_E_OK
)
...
@@ -895,24 +898,35 @@ static void testAuth(ULONG data_rep, BOOL fake)
...
@@ -895,24 +898,35 @@ static void testAuth(ULONG data_rep, BOOL fake)
goto
tAuthend
;
goto
tAuthend
;
}
}
sec_status
=
pQueryContextAttributesA
(
&
client
.
ctxt
,
sec_status
=
pQueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_SIZES
,
&
sizes
);
SECPKG_ATTR_SIZES
,
&
ctxt_sizes
);
ok
(
sec_status
==
SEC_E_OK
,
"pQueryContextAttributesA(SECPKG_ATTR_SIZES) returned %s
\n
"
,
getSecError
(
sec_status
));
ok
((
sizes
.
cbMaxToken
==
1904
)
||
(
sizes
.
cbMaxToken
==
2888
),
"cbMaxToken should be 1904 or 2888 but is %lu
\n
"
,
sizes
.
cbMaxToken
);
ok
(
sizes
.
cbMaxSignature
==
16
,
"cbMaxSignature should be 16 but is %lu
\n
"
,
sizes
.
cbMaxSignature
);
ok
(
sizes
.
cbSecurityTrailer
==
16
,
"cbSecurityTrailer should be 16 but is %lu
\n
"
,
sizes
.
cbSecurityTrailer
);
ok
(
sizes
.
cbBlockSize
==
0
,
"cbBlockSize should be 0 but is %lu
\n
"
,
sizes
.
cbBlockSize
);
ok
(
sec_status
==
SEC_E_OK
,
sec_status
=
pQueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_STREAM_SIZES
,
&
stream_sizes
);
"pQueryContextAttributesA(SECPKG_ATTR
_SIZES) returned %s
\n
"
,
ok
(
sec_status
==
SEC_E_UNSUPPORTED_FUNCTION
,
"pQueryContextAttributesA(SECPKG_ATTR_STREAM
_SIZES) returned %s
\n
"
,
getSecError
(
sec_status
));
getSecError
(
sec_status
));
ok
((
ctxt_sizes
.
cbMaxToken
==
1904
)
||
(
ctxt_sizes
.
cbMaxToken
==
2888
),
"cbMaxToken should be 1904 or 2888 but is %lu
\n
"
,
memset
(
&
key
,
0
,
sizeof
(
key
)
);
ctxt_sizes
.
cbMaxToken
);
sec_status
=
QueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_KEY_INFO
,
&
key
);
ok
(
ctxt_sizes
.
cbMaxSignature
==
16
,
ok
(
sec_status
==
SEC_E_OK
,
"pQueryContextAttributesA returned %08lx
\n
"
,
sec_status
);
"cbMaxSignature should be 16 but is %lu
\n
"
,
if
(
fake
)
ctxt_sizes
.
cbMaxSignature
);
{
ok
(
ctxt_sizes
.
cbSecurityTrailer
==
16
,
ok
(
!
strcmp
(
key
.
sSignatureAlgorithmName
,
"RSADSI RC4-CRC32"
),
"got '%s'
\n
"
,
key
.
sSignatureAlgorithmName
);
"cbSecurityTrailer should be 16 but is %lu
\n
"
,
ok
(
!
strcmp
(
key
.
sEncryptAlgorithmName
,
"RSADSI RC4"
),
"got '%s'
\n
"
,
key
.
sEncryptAlgorithmName
);
ctxt_sizes
.
cbSecurityTrailer
);
ok
(
key
.
SignatureAlgorithm
==
0xffffff7c
,
"got %#lx
\n
"
,
key
.
SignatureAlgorithm
);
ok
(
ctxt_sizes
.
cbBlockSize
==
0
,
}
"cbBlockSize should be 0 but is %lu
\n
"
,
else
ctxt_sizes
.
cbBlockSize
);
{
ok
(
!
strcmp
(
key
.
sSignatureAlgorithmName
,
"HMAC-MD5"
),
"got '%s'
\n
"
,
key
.
sSignatureAlgorithmName
);
ok
(
!
strcmp
(
key
.
sEncryptAlgorithmName
,
"RSADSI RC4"
),
"got '%s'
\n
"
,
key
.
sEncryptAlgorithmName
);
ok
(
key
.
SignatureAlgorithm
==
0xffffff76
,
"got %#lx
\n
"
,
key
.
SignatureAlgorithm
);
}
ok
(
key
.
KeySize
==
128
,
"got %lu
\n
"
,
key
.
KeySize
);
ok
(
key
.
EncryptAlgorithm
==
CALG_RC4
,
"got %#lx
\n
"
,
key
.
EncryptAlgorithm
);
memset
(
&
info
,
0
,
sizeof
(
info
));
memset
(
&
info
,
0
,
sizeof
(
info
));
sec_status
=
QueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_NEGOTIATION_INFO
,
&
info
);
sec_status
=
QueryContextAttributesA
(
&
client
.
ctxt
,
SECPKG_ATTR_NEGOTIATION_INFO
,
&
info
);
...
...
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