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
546b84c0
Commit
546b84c0
authored
Jun 04, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Implement and test SystemFunction030.
parent
c077aaf1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
5 deletions
+62
-5
advapi32.spec
dlls/advapi32/advapi32.spec
+1
-1
crypt.c
dlls/advapi32/crypt.c
+17
-0
crypt_lmhash.c
dlls/advapi32/tests/crypt_lmhash.c
+44
-4
No files found.
dlls/advapi32/advapi32.spec
View file @
546b84c0
...
...
@@ -624,7 +624,7 @@
@ stdcall SystemFunction027(ptr ptr ptr) SystemFunction025
@ stub SystemFunction028
@ stub SystemFunction029
@ st
ub SystemFunction030
@ st
dcall SystemFunction030(ptr ptr)
@ stub SystemFunction031
@ stdcall SystemFunction032(ptr ptr)
@ stub SystemFunction033
...
...
dlls/advapi32/crypt.c
View file @
546b84c0
...
...
@@ -1969,6 +1969,23 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dw
/******************************************************************************
* SystemFunction036 (ADVAPI32.@)
*
* Tests if two blocks of 16 bytes are equal
*
* PARAMS
* b1,b2 [I] block of 16 bytes
*
* RETURNS
* TRUE if blocks are the same
* FALSE if blocks are different
*/
BOOL
WINAPI
SystemFunction030
(
PVOID
b1
,
PVOID
b2
)
{
return
!
memcmp
(
b1
,
b2
,
0x10
);
}
/******************************************************************************
* SystemFunction036 (ADVAPI32.@)
*
* MSDN documents this function as RtlGenRandom and declares it in ntsecapi.h
*
* PARAMS
...
...
dlls/advapi32/tests/crypt_lmhash.c
View file @
546b84c0
...
...
@@ -43,6 +43,7 @@ typedef VOID (WINAPI *fnSystemFunction006)( PCSTR passwd, PSTR lmhash );
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction008
)(
const
LPBYTE
,
const
LPBYTE
,
LPBYTE
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction009
)(
const
LPBYTE
,
const
LPBYTE
,
LPBYTE
);
typedef
int
(
WINAPI
*
descrypt
)(
unsigned
char
*
,
unsigned
char
*
,
unsigned
char
*
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction030
)(
void
*
,
void
*
);
typedef
NTSTATUS
(
WINAPI
*
fnSystemFunction032
)(
struct
ustring
*
,
struct
ustring
*
);
fnSystemFunction001
pSystemFunction001
;
...
...
@@ -78,6 +79,7 @@ descrypt pSystemFunction025;
descrypt
pSystemFunction026
;
descrypt
pSystemFunction027
;
fnSystemFunction030
pSystemFunction030
;
fnSystemFunction032
pSystemFunction032
;
static
void
test_SystemFunction006
(
void
)
...
...
@@ -474,6 +476,40 @@ static void test_SystemFunction_dec32(descrypt func, int num)
ok
(
!
memcmp
(
output
,
des_plaintext
,
sizeof
des_plaintext
),
"plaintext wrong (%d)
\n
"
,
num
);
}
static
void
test_SystemFunction030
(
void
)
{
unsigned
char
arg1
[
0x20
],
arg2
[
0x20
];
int
r
;
/* r = pSystemFunction030(NULL, NULL); - crashes */
memset
(
arg1
,
0
,
sizeof
arg1
);
memset
(
arg2
,
0
,
sizeof
arg2
);
arg1
[
0x10
]
=
1
;
r
=
pSystemFunction030
(
arg1
,
arg2
);
ok
(
r
==
1
,
"wrong error code
\n
"
);
memset
(
arg1
,
1
,
sizeof
arg1
);
memset
(
arg2
,
1
,
sizeof
arg2
);
arg1
[
0x10
]
=
0
;
r
=
pSystemFunction030
(
arg1
,
arg2
);
ok
(
r
==
1
,
"wrong error code
\n
"
);
memset
(
arg1
,
0
,
sizeof
arg1
);
memset
(
arg2
,
1
,
sizeof
arg2
);
r
=
pSystemFunction030
(
arg1
,
arg2
);
ok
(
r
==
0
,
"wrong error code
\n
"
);
memset
(
arg1
,
1
,
sizeof
arg1
);
memset
(
arg2
,
0
,
sizeof
arg2
);
r
=
pSystemFunction030
(
arg1
,
arg2
);
ok
(
r
==
0
,
"wrong error code
\n
"
);
}
START_TEST
(
crypt_lmhash
)
{
HMODULE
module
;
...
...
@@ -512,10 +548,6 @@ START_TEST(crypt_lmhash)
if
(
pSystemFunction009
)
test_SystemFunction009
();
pSystemFunction032
=
(
fnSystemFunction032
)
GetProcAddress
(
module
,
"SystemFunction032"
);
if
(
pSystemFunction032
)
test_SystemFunction032
();
pSystemFunction012
=
(
descrypt
)
GetProcAddress
(
module
,
"SystemFunction012"
);
pSystemFunction013
=
(
descrypt
)
GetProcAddress
(
module
,
"SystemFunction013"
);
pSystemFunction014
=
(
descrypt
)
GetProcAddress
(
module
,
"SystemFunction014"
);
...
...
@@ -557,4 +589,12 @@ START_TEST(crypt_lmhash)
/* these descrypt two DES blocks with a short key */
test_SystemFunction_dec32
(
pSystemFunction025
,
25
);
test_SystemFunction_dec32
(
pSystemFunction027
,
27
);
pSystemFunction030
=
(
fnSystemFunction030
)
GetProcAddress
(
module
,
"SystemFunction030"
);
if
(
pSystemFunction030
)
test_SystemFunction030
();
pSystemFunction032
=
(
fnSystemFunction032
)
GetProcAddress
(
module
,
"SystemFunction032"
);
if
(
pSystemFunction032
)
test_SystemFunction032
();
}
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