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
0210f5eb
Commit
0210f5eb
authored
Mar 03, 2007
by
Kai Blin
Committed by
Alexandre Julliard
Mar 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32: Use skip for skipped tests, reduce indentation.
parent
3f089b44
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
30 deletions
+27
-30
ntlm.c
dlls/secur32/tests/ntlm.c
+27
-30
No files found.
dlls/secur32/tests/ntlm.c
View file @
0210f5eb
...
...
@@ -568,7 +568,7 @@ static void testInitializeSecurityContextFlags()
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!=
SEC_E_OK
)
{
trace
(
"Package not installed, skipping test!
\n
"
);
skip
(
"Package not installed, skipping test!
\n
"
);
return
;
}
...
...
@@ -585,7 +585,7 @@ static void testInitializeSecurityContextFlags()
if
((
sec_status
=
setupClient
(
&
client
,
sec_pkg_name
))
!=
SEC_E_OK
)
{
trace
(
"Setting up the client returned %s, skipping test!
\n
"
,
skip
(
"Setting up the client returned %s, skipping test!
\n
"
,
getSecError
(
sec_status
));
return
;
}
...
...
@@ -774,14 +774,17 @@ static void testAuth(ULONG data_rep, BOOL fake)
SspiData
client
,
server
;
SEC_WINNT_AUTH_IDENTITY
id
;
SecPkgContext_Sizes
ctxt_sizes
;
static
char
sec_pkg_name
[]
=
"NTLM"
;
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
==
SEC_E_OK
)
{
static
char
test_user
[]
=
"testuser"
,
static
char
sec_pkg_name
[]
=
"NTLM"
,
test_user
[]
=
"testuser"
,
workgroup
[]
=
"WORKGROUP"
,
test_pass
[]
=
"testpass"
;
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!=
SEC_E_OK
)
{
skip
(
"Package not installed, skipping test.
\n
"
);
return
;
}
pFreeContextBuffer
(
pkg_info
);
id
.
User
=
(
unsigned
char
*
)
test_user
;
id
.
UserLength
=
strlen
((
char
*
)
id
.
User
);
...
...
@@ -797,7 +800,7 @@ static void testAuth(ULONG data_rep, BOOL fake)
if
(
sec_status
!=
SEC_E_OK
)
{
trace
(
"Error: Setting up the client returned %s, exiting test!
\n
"
,
skip
(
"Error: Setting up the client returned %s, exiting test!
\n
"
,
getSecError
(
sec_status
));
pFreeCredentialsHandle
(
client
.
cred
);
return
;
...
...
@@ -810,14 +813,13 @@ static void testAuth(ULONG data_rep, BOOL fake)
if
(
sec_status
!=
SEC_E_OK
)
{
trace
(
"Error: Setting up the server returned %s, exiting test!
\n
"
,
skip
(
"Error: Setting up the server returned %s, exiting test!
\n
"
,
getSecError
(
sec_status
));
pFreeCredentialsHandle
(
server
.
cred
);
pFreeCredentialsHandle
(
client
.
cred
);
return
;
}
while
(
client_stat
==
SEC_I_CONTINUE_NEEDED
&&
server_stat
==
SEC_I_CONTINUE_NEEDED
)
{
client_stat
=
runClient
(
&
client
,
first
,
data_rep
);
...
...
@@ -843,8 +845,12 @@ static void testAuth(ULONG data_rep, BOOL fake)
first
=
FALSE
;
}
if
(
client_stat
=
=
SEC_E_OK
)
if
(
client_stat
!
=
SEC_E_OK
)
{
skip
(
"Authentication failed, skipping test.
\n
"
);
goto
tAuthend
;
}
sec_status
=
pQueryContextAttributesA
(
client
.
ctxt
,
SECPKG_ATTR_SIZES
,
&
ctxt_sizes
);
...
...
@@ -863,10 +869,8 @@ static void testAuth(ULONG data_rep, BOOL fake)
ok
(
ctxt_sizes
.
cbBlockSize
==
0
,
"cbBlockSize should be 0 but is %lu
\n
"
,
ctxt_sizes
.
cbBlockSize
);
}
else
trace
(
"Authentication failed, skipping test.
\n
"
);
tAuthend:
cleanupBuffers
(
&
client
);
cleanupBuffers
(
&
server
);
...
...
@@ -891,11 +895,6 @@ static void testAuth(ULONG data_rep, BOOL fake)
sec_status
=
pFreeCredentialsHandle
(
client
.
cred
);
ok
(
sec_status
==
SEC_E_OK
,
"FreeCredentialsHandle(client) returned %s
\n
"
,
getSecError
(
sec_status
));
}
else
{
trace
(
"Package not installed, skipping test.
\n
"
);
}
}
static
void
testSignSeal
()
...
...
@@ -912,16 +911,19 @@ static void testSignSeal()
SecBuffer
data
[
2
],
fake_data
[
2
],
complex_data
[
4
];
ULONG
qop
=
0
;
SecPkgContext_Sizes
ctxt_sizes
;
static
char
test_user
[]
=
"testuser"
,
workgroup
[]
=
"WORKGROUP"
,
test_pass
[]
=
"testpass"
;
/****************************************************************
* This is basically the same as in testAuth with a fake server,
* as we need a valid, authenticated context.
*/
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
=
=
SEC_E_OK
)
if
(
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
)
!
=
SEC_E_OK
)
{
s
tatic
char
test_user
[]
=
"testuser"
,
workgroup
[]
=
"WORKGROUP"
,
test_pass
[]
=
"testpass"
;
s
kip
(
"Package not installed, skipping test.
\n
"
);
return
;
}
pFreeContextBuffer
(
pkg_info
);
id
.
User
=
(
unsigned
char
*
)
test_user
;
...
...
@@ -938,7 +940,7 @@ static void testSignSeal()
if
(
sec_status
!=
SEC_E_OK
)
{
trace
(
"Error: Setting up the client returned %s, exiting test!
\n
"
,
skip
(
"Error: Setting up the client returned %s, exiting test!
\n
"
,
getSecError
(
sec_status
));
pFreeCredentialsHandle
(
client
.
cred
);
return
;
...
...
@@ -966,7 +968,7 @@ static void testSignSeal()
if
(
pQueryContextAttributesA
(
client
.
ctxt
,
SECPKG_ATTR_SIZES
,
&
ctxt_sizes
)
!=
SEC_E_OK
)
{
trace
(
"Failed to get context sizes, aborting test.
\n
"
);
skip
(
"Failed to get context sizes, aborting test.
\n
"
);
goto
end
;
}
...
...
@@ -1112,11 +1114,6 @@ end:
HeapFree
(
GetProcessHeap
(),
0
,
data
[
1
].
pvBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
complex_data
[
1
].
pvBuffer
);
HeapFree
(
GetProcessHeap
(),
0
,
complex_data
[
3
].
pvBuffer
);
}
else
{
trace
(
"Package not installed, skipping test.
\n
"
);
}
}
START_TEST
(
ntlm
)
...
...
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