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
372a281c
Commit
372a281c
authored
Oct 26, 2005
by
Ivan Leo Puoti
Committed by
Alexandre Julliard
Oct 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make secur32.dll tests load on nt 4.0.
parent
5a932ccd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
+41
-11
Makefile.in
dlls/secur32/tests/Makefile.in
+1
-1
main.c
dlls/secur32/tests/main.c
+40
-10
No files found.
dlls/secur32/tests/Makefile.in
View file @
372a281c
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
secur32.dll
TESTDLL
=
secur32.dll
IMPORTS
=
secur32
kernel32
IMPORTS
=
kernel32
CTESTS
=
\
CTESTS
=
\
main.c
main.c
...
...
dlls/secur32/tests/main.c
View file @
372a281c
...
@@ -30,6 +30,26 @@
...
@@ -30,6 +30,26 @@
#define BUFF_SIZE 2048
#define BUFF_SIZE 2048
#define MAX_MESSAGE 12000
#define MAX_MESSAGE 12000
static
HMODULE
secdll
;
static
PSecurityFunctionTableA
(
SEC_ENTRY
*
pInitSecurityInterfaceA
)(
void
);
static
SECURITY_STATUS
(
SEC_ENTRY
*
pEnumerateSecurityPackagesA
)(
PULONG
,
PSecPkgInfoA
*
);
static
SECURITY_STATUS
(
SEC_ENTRY
*
pFreeContextBuffer
)(
PVOID
pv
);
static
SECURITY_STATUS
(
SEC_ENTRY
*
pQuerySecurityPackageInfoA
)(
SEC_CHAR
*
,
PSecPkgInfoA
*
);
void
InitFunctionPtrs
(
void
)
{
secdll
=
LoadLibraryA
(
"secur32.dll"
);
if
(
!
secdll
)
secdll
=
LoadLibraryA
(
"security.dll"
);
if
(
secdll
)
{
pInitSecurityInterfaceA
=
(
PVOID
)
GetProcAddress
(
secdll
,
"InitSecurityInterfaceA"
);
pEnumerateSecurityPackagesA
=
(
PVOID
)
GetProcAddress
(
secdll
,
"EnumerateSecurityPackagesA"
);
pFreeContextBuffer
=
(
PVOID
)
GetProcAddress
(
secdll
,
"FreeContextBuffer"
);
pQuerySecurityPackageInfoA
=
(
PVOID
)
GetProcAddress
(
secdll
,
"QuerySecurityPackageInfo"
);
}
}
/*---------------------------------------------------------*/
/*---------------------------------------------------------*/
/* General helper functions */
/* General helper functions */
...
@@ -67,7 +87,7 @@ static SECURITY_STATUS setupPackageA(SEC_CHAR *p_package_name,
...
@@ -67,7 +87,7 @@ static SECURITY_STATUS setupPackageA(SEC_CHAR *p_package_name,
{
{
SECURITY_STATUS
ret
=
SEC_E_SECPKG_NOT_FOUND
;
SECURITY_STATUS
ret
=
SEC_E_SECPKG_NOT_FOUND
;
ret
=
QuerySecurityPackageInfoA
(
p_package_name
,
p_pkg_info
);
ret
=
p
QuerySecurityPackageInfoA
(
p_package_name
,
p_pkg_info
);
return
ret
;
return
ret
;
}
}
...
@@ -207,7 +227,7 @@ static void testInitSecurityInterface(void)
...
@@ -207,7 +227,7 @@ static void testInitSecurityInterface(void)
{
{
PSecurityFunctionTable
sec_fun_table
=
NULL
;
PSecurityFunctionTable
sec_fun_table
=
NULL
;
sec_fun_table
=
InitSecurityInterface
();
sec_fun_table
=
pInitSecurityInterfaceA
();
ok
(
sec_fun_table
!=
NULL
,
"InitSecurityInterface() returned NULL.
\n
"
);
ok
(
sec_fun_table
!=
NULL
,
"InitSecurityInterface() returned NULL.
\n
"
);
}
}
...
@@ -221,7 +241,7 @@ static void testEnumerateSecurityPackages(void)
...
@@ -221,7 +241,7 @@ static void testEnumerateSecurityPackages(void)
trace
(
"Running testEnumerateSecurityPackages
\n
"
);
trace
(
"Running testEnumerateSecurityPackages
\n
"
);
sec_status
=
EnumerateSecurityPackages
(
&
num_packages
,
&
pkg_info
);
sec_status
=
pEnumerateSecurityPackagesA
(
&
num_packages
,
&
pkg_info
);
ok
(
sec_status
==
SEC_E_OK
,
ok
(
sec_status
==
SEC_E_OK
,
"EnumerateSecurityPackages() should return %ld, not %08lx
\n
"
,
"EnumerateSecurityPackages() should return %ld, not %08lx
\n
"
,
...
@@ -265,7 +285,7 @@ static void testEnumerateSecurityPackages(void)
...
@@ -265,7 +285,7 @@ static void testEnumerateSecurityPackages(void)
trace
(
"
\n
"
);
trace
(
"
\n
"
);
}
}
FreeContextBuffer
(
pkg_info
);
p
FreeContextBuffer
(
pkg_info
);
}
}
...
@@ -300,7 +320,7 @@ static void testQuerySecurityPackageInfo(void)
...
@@ -300,7 +320,7 @@ static void testQuerySecurityPackageInfo(void)
ok
(
max_token
==
12000
,
"cbMaxToken for Negotiate is %ld, not 12000.
\n
"
,
ok
(
max_token
==
12000
,
"cbMaxToken for Negotiate is %ld, not 12000.
\n
"
,
max_token
);
max_token
);
sec_status
=
FreeContextBuffer
(
&
pkg_info
);
sec_status
=
p
FreeContextBuffer
(
&
pkg_info
);
ok
(
sec_status
==
SEC_E_OK
,
ok
(
sec_status
==
SEC_E_OK
,
"Return value of FreeContextBuffer() shouldn't be %s
\n
"
,
"Return value of FreeContextBuffer() shouldn't be %s
\n
"
,
...
@@ -310,12 +330,12 @@ static void testQuerySecurityPackageInfo(void)
...
@@ -310,12 +330,12 @@ static void testQuerySecurityPackageInfo(void)
lstrcpy
(
sec_pkg_name
,
"Winetest"
);
lstrcpy
(
sec_pkg_name
,
"Winetest"
);
sec_status
=
QuerySecurityPackageInfo
(
sec_pkg_name
,
&
pkg_info
);
sec_status
=
pQuerySecurityPackageInfoA
(
sec_pkg_name
,
&
pkg_info
);
ok
(
sec_status
!=
SEC_E_OK
,
ok
(
sec_status
!=
SEC_E_OK
,
"Return value of QuerySecurityPackageInfo() should not be %s for a nonexistent package
\n
"
,
getSecStatusError
(
SEC_E_OK
));
"Return value of QuerySecurityPackageInfo() should not be %s for a nonexistent package
\n
"
,
getSecStatusError
(
SEC_E_OK
));
sec_status
=
FreeContextBuffer
(
&
pkg_info
);
sec_status
=
p
FreeContextBuffer
(
&
pkg_info
);
ok
(
sec_status
==
SEC_E_OK
,
ok
(
sec_status
==
SEC_E_OK
,
"Return value of FreeContextBuffer() shouldn't be %s
\n
"
,
"Return value of FreeContextBuffer() shouldn't be %s
\n
"
,
...
@@ -339,7 +359,7 @@ void testAuthentication(void)
...
@@ -339,7 +359,7 @@ void testAuthentication(void)
trace
(
"Running testAuthentication
\n
"
);
trace
(
"Running testAuthentication
\n
"
);
sft
=
InitSecurityInterface
();
sft
=
pInitSecurityInterfaceA
();
ok
(
sft
!=
NULL
,
"InitSecurityInterface() returned NULL!
\n
"
);
ok
(
sft
!=
NULL
,
"InitSecurityInterface() returned NULL!
\n
"
);
...
@@ -369,15 +389,25 @@ void testAuthentication(void)
...
@@ -369,15 +389,25 @@ void testAuthentication(void)
&
count_server
,
&
done
,
"foo"
,
&
client_cred
,
&
client_ctxt
,
sft
);
&
count_server
,
&
done
,
"foo"
,
&
client_cred
,
&
client_ctxt
,
sft
);
}
}
FreeContextBuffer
(
&
client_buff
);
p
FreeContextBuffer
(
&
client_buff
);
FreeContextBuffer
(
&
server_buff
);
p
FreeContextBuffer
(
&
server_buff
);
}
}
START_TEST
(
main
)
START_TEST
(
main
)
{
{
InitFunctionPtrs
();
if
(
pInitSecurityInterfaceA
)
testInitSecurityInterface
();
testInitSecurityInterface
();
if
(
pFreeContextBuffer
)
{
if
(
pEnumerateSecurityPackagesA
)
testEnumerateSecurityPackages
();
testEnumerateSecurityPackages
();
if
(
pQuerySecurityPackageInfoA
)
testQuerySecurityPackageInfo
();
testQuerySecurityPackageInfo
();
if
(
pInitSecurityInterfaceA
)
testAuthentication
();
testAuthentication
();
}
if
(
secdll
)
FreeLibrary
(
secdll
);
}
}
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