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
53d810c9
Commit
53d810c9
authored
Oct 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Make function pointers static and remove redundant typedefs.
parent
536fc570
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
72 deletions
+52
-72
crypt_lmhash.c
dlls/advapi32/tests/crypt_lmhash.c
+36
-48
crypt_md4.c
dlls/advapi32/tests/crypt_md4.c
+10
-14
crypt_md5.c
dlls/advapi32/tests/crypt_md5.c
+6
-10
security.c
dlls/advapi32/tests/security.c
+0
-0
No files found.
dlls/advapi32/tests/crypt_lmhash.c
View file @
53d810c9
...
...
@@ -34,56 +34,44 @@ struct ustring {
unsigned
char
*
Buffer
;
};
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction001
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction002
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction003
)(
const
BYTE
*
,
LPBYTE
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction004
)(
const
struct
ustring
*
,
const
struct
ustring
*
,
struct
ustring
*
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction005
)(
const
struct
ustring
*
,
const
struct
ustring
*
,
struct
ustring
*
);
typedef
VOID
(
WINAPI
*
fnSystemFunction006
)(
PCSTR
passwd
,
PSTR
lmhash
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction008
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction009
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
typedef
int
(
WINAPI
*
descrypt
)(
unsigned
char
*
,
unsigned
char
*
,
unsigned
char
*
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction030
)(
const
void
*
,
const
void
*
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction032
)(
struct
ustring
*
,
const
struct
ustring
*
);
fnSystemFunction001
pSystemFunction001
;
fnSystemFunction002
pSystemFunction002
;
fnSystemFunction003
pSystemFunction003
;
fnSystemFunction004
pSystemFunction004
;
fnSystemFunction004
pSystemFunction005
;
fnSystemFunction006
pSystemFunction006
;
fnSystemFunction008
pSystemFunction008
;
fnSystemFunction008
pSystemFunction009
;
static
NTSTATUS
(
WINAPI
*
pSystemFunction001
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction002
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction003
)(
const
BYTE
*
,
LPBYTE
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction004
)(
const
struct
ustring
*
,
const
struct
ustring
*
,
struct
ustring
*
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction005
)(
const
struct
ustring
*
,
const
struct
ustring
*
,
struct
ustring
*
);
static
VOID
(
WINAPI
*
pSystemFunction006
)(
PCSTR
passwd
,
PSTR
lmhash
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction008
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction009
)(
const
BYTE
*
,
const
BYTE
*
,
LPBYTE
);
static
NTSTATUS
(
WINAPI
*
pSystemFunction032
)(
struct
ustring
*
,
const
struct
ustring
*
);
/* encrypt two blocks */
descrypt
pSystemFunction012
;
descrypt
pSystemFunction014
;
descrypt
pSystemFunction016
;
descrypt
pSystemFunction018
;
descrypt
pSystemFunction020
;
descrypt
pSystemFunction022
;
static
descrypt
pSystemFunction012
;
static
descrypt
pSystemFunction014
;
static
descrypt
pSystemFunction016
;
static
descrypt
pSystemFunction018
;
static
descrypt
pSystemFunction020
;
static
descrypt
pSystemFunction022
;
/* decrypt two blocks */
descrypt
pSystemFunction013
;
descrypt
pSystemFunction015
;
descrypt
pSystemFunction017
;
descrypt
pSystemFunction019
;
descrypt
pSystemFunction021
;
descrypt
pSystemFunction023
;
static
descrypt
pSystemFunction013
;
static
descrypt
pSystemFunction015
;
static
descrypt
pSystemFunction017
;
static
descrypt
pSystemFunction019
;
static
descrypt
pSystemFunction021
;
static
descrypt
pSystemFunction023
;
/* encrypt two blocks with a 32bit key */
descrypt
pSystemFunction024
;
descrypt
pSystemFunction025
;
static
descrypt
pSystemFunction024
;
static
descrypt
pSystemFunction025
;
/* decrypt two blocks with a 32bit key */
descrypt
pSystemFunction026
;
descrypt
pSystemFunction027
;
static
descrypt
pSystemFunction026
;
static
descrypt
pSystemFunction027
;
typedef
int
(
WINAPI
*
memcmpfunc
)(
unsigned
char
*
,
unsigned
char
*
);
memcmpfunc
pSystemFunction030
;
memcmpfunc
pSystemFunction031
;
fnSystemFunction032
pSystemFunction032
;
static
memcmpfunc
pSystemFunction030
;
static
memcmpfunc
pSystemFunction031
;
static
void
test_SystemFunction006
(
void
)
{
...
...
@@ -545,49 +533,49 @@ START_TEST(crypt_lmhash)
{
HMODULE
module
=
GetModuleHandleA
(
"advapi32.dll"
);
pSystemFunction001
=
(
fnSystemFunction001
)
GetProcAddress
(
module
,
"SystemFunction001"
);
pSystemFunction001
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction001"
);
if
(
pSystemFunction001
)
test_SystemFunction001
();
else
win_skip
(
"SystemFunction001 is not available
\n
"
);
pSystemFunction002
=
(
fnSystemFunction002
)
GetProcAddress
(
module
,
"SystemFunction002"
);
pSystemFunction002
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction002"
);
if
(
pSystemFunction002
)
test_SystemFunction002
();
else
win_skip
(
"SystemFunction002 is not available
\n
"
);
pSystemFunction003
=
(
fnSystemFunction003
)
GetProcAddress
(
module
,
"SystemFunction003"
);
pSystemFunction003
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction003"
);
if
(
pSystemFunction003
)
test_SystemFunction003
();
else
win_skip
(
"SystemFunction002 is not available
\n
"
);
pSystemFunction004
=
(
fnSystemFunction004
)
GetProcAddress
(
module
,
"SystemFunction004"
);
pSystemFunction004
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction004"
);
if
(
pSystemFunction004
)
test_SystemFunction004
();
else
win_skip
(
"SystemFunction004 is not available
\n
"
);
pSystemFunction005
=
(
fnSystemFunction005
)
GetProcAddress
(
module
,
"SystemFunction005"
);
pSystemFunction005
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction005"
);
if
(
pSystemFunction005
)
test_SystemFunction005
();
else
win_skip
(
"SystemFunction005 is not available
\n
"
);
pSystemFunction006
=
(
fnSystemFunction006
)
GetProcAddress
(
module
,
"SystemFunction006"
);
pSystemFunction006
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction006"
);
if
(
pSystemFunction006
)
test_SystemFunction006
();
else
win_skip
(
"SystemFunction006 is not available
\n
"
);
pSystemFunction008
=
(
fnSystemFunction008
)
GetProcAddress
(
module
,
"SystemFunction008"
);
pSystemFunction008
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction008"
);
if
(
pSystemFunction008
)
test_SystemFunction008
();
else
win_skip
(
"SystemFunction008 is not available
\n
"
);
pSystemFunction009
=
(
fnSystemFunction009
)
GetProcAddress
(
module
,
"SystemFunction009"
);
pSystemFunction009
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction009"
);
if
(
pSystemFunction009
)
test_SystemFunction009
();
else
...
...
@@ -641,7 +629,7 @@ START_TEST(crypt_lmhash)
test_memcmpfunc
(
pSystemFunction030
);
test_memcmpfunc
(
pSystemFunction031
);
pSystemFunction032
=
(
fnSystemFunction032
)
GetProcAddress
(
module
,
"SystemFunction032"
);
pSystemFunction032
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction032"
);
if
(
pSystemFunction032
)
test_SystemFunction032
();
else
...
...
dlls/advapi32/tests/crypt_md4.c
View file @
53d810c9
...
...
@@ -36,18 +36,14 @@ typedef struct
unsigned
char
digest
[
16
];
}
MD4_CTX
;
typedef
VOID
(
WINAPI
*
fn
MD4Init
)(
MD4_CTX
*
ctx
);
typedef
VOID
(
WINAPI
*
fn
MD4Update
)(
MD4_CTX
*
ctx
,
const
unsigned
char
*
src
,
const
int
len
);
typedef
VOID
(
WINAPI
*
fn
MD4Final
)(
MD4_CTX
*
ctx
);
typedef
int
(
WINAPI
*
fn
SystemFunction007
)(
const
UNICODE_STRING
*
,
LPBYTE
);
static
VOID
(
WINAPI
*
p
MD4Init
)(
MD4_CTX
*
ctx
);
static
VOID
(
WINAPI
*
p
MD4Update
)(
MD4_CTX
*
ctx
,
const
unsigned
char
*
src
,
const
int
len
);
static
VOID
(
WINAPI
*
p
MD4Final
)(
MD4_CTX
*
ctx
);
static
int
(
WINAPI
*
p
SystemFunction007
)(
const
UNICODE_STRING
*
,
LPBYTE
);
typedef
int
(
WINAPI
*
md4hashfunc
)(
LPVOID
,
const
LPBYTE
,
LPBYTE
);
fnMD4Init
pMD4Init
;
fnMD4Update
pMD4Update
;
fnMD4Final
pMD4Final
;
fnSystemFunction007
pSystemFunction007
;
md4hashfunc
pSystemFunction010
;
md4hashfunc
pSystemFunction011
;
static
md4hashfunc
pSystemFunction010
;
static
md4hashfunc
pSystemFunction011
;
#define ctxcmp( a, b ) memcmp( a, b, FIELD_OFFSET( MD4_CTX, in ) )
...
...
@@ -149,16 +145,16 @@ START_TEST(crypt_md4)
module
=
GetModuleHandleA
(
"advapi32.dll"
);
pMD4Init
=
(
fnMD4Init
)
GetProcAddress
(
module
,
"MD4Init"
);
pMD4Update
=
(
fnMD4Update
)
GetProcAddress
(
module
,
"MD4Update"
);
pMD4Final
=
(
fnMD4Final
)
GetProcAddress
(
module
,
"MD4Final"
);
pMD4Init
=
(
void
*
)
GetProcAddress
(
module
,
"MD4Init"
);
pMD4Update
=
(
void
*
)
GetProcAddress
(
module
,
"MD4Update"
);
pMD4Final
=
(
void
*
)
GetProcAddress
(
module
,
"MD4Final"
);
if
(
pMD4Init
&&
pMD4Update
&&
pMD4Final
)
test_md4_ctx
();
else
win_skip
(
"MD4Init and/or MD4Update and/or MD4Final are not available
\n
"
);
pSystemFunction007
=
(
fnSystemFunction007
)
GetProcAddress
(
module
,
"SystemFunction007"
);
pSystemFunction007
=
(
void
*
)
GetProcAddress
(
module
,
"SystemFunction007"
);
if
(
pSystemFunction007
)
test_SystemFunction007
();
else
...
...
dlls/advapi32/tests/crypt_md5.c
View file @
53d810c9
...
...
@@ -33,13 +33,9 @@ typedef struct
unsigned
char
digest
[
16
];
}
MD5_CTX
;
typedef
VOID
(
WINAPI
*
fnMD5Init
)(
MD5_CTX
*
ctx
);
typedef
VOID
(
WINAPI
*
fnMD5Update
)(
MD5_CTX
*
ctx
,
const
unsigned
char
*
src
,
const
int
len
);
typedef
VOID
(
WINAPI
*
fnMD5Final
)(
MD5_CTX
*
ctx
);
fnMD5Init
pMD5Init
;
fnMD5Update
pMD5Update
;
fnMD5Final
pMD5Final
;
static
VOID
(
WINAPI
*
pMD5Init
)(
MD5_CTX
*
ctx
);
static
VOID
(
WINAPI
*
pMD5Update
)(
MD5_CTX
*
ctx
,
const
unsigned
char
*
src
,
const
int
len
);
static
VOID
(
WINAPI
*
pMD5Final
)(
MD5_CTX
*
ctx
);
#define ctxcmp( a, b ) memcmp( a, b, FIELD_OFFSET( MD5_CTX, in ) )
...
...
@@ -79,9 +75,9 @@ static void test_md5_ctx(void)
module
=
GetModuleHandleA
(
"advapi32.dll"
);
pMD5Init
=
(
fnMD5Init
)
GetProcAddress
(
module
,
"MD5Init"
);
pMD5Update
=
(
fnMD5Update
)
GetProcAddress
(
module
,
"MD5Update"
);
pMD5Final
=
(
fnMD5Final
)
GetProcAddress
(
module
,
"MD5Final"
);
pMD5Init
=
(
void
*
)
GetProcAddress
(
module
,
"MD5Init"
);
pMD5Update
=
(
void
*
)
GetProcAddress
(
module
,
"MD5Update"
);
pMD5Final
=
(
void
*
)
GetProcAddress
(
module
,
"MD5Final"
);
if
(
!
pMD5Init
||
!
pMD5Update
||
!
pMD5Final
)
{
...
...
dlls/advapi32/tests/security.c
View file @
53d810c9
This diff is collapsed.
Click to expand it.
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