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
55729020
Commit
55729020
authored
Jul 25, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Test getting the hash from a hash message with an invalid index.
parent
c4f1adb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
msg.c
dlls/crypt32/tests/msg.c
+14
-1
No files found.
dlls/crypt32/tests/msg.c
View file @
55729020
...
...
@@ -1853,6 +1853,7 @@ static void test_decode_msg_get_param(void)
HCRYPTMSG
msg
;
BOOL
ret
;
DWORD
size
=
0
,
version
;
LPBYTE
buf
;
msg
=
CryptMsgOpenToDecode
(
PKCS_7_ASN_ENCODING
,
0
,
0
,
0
,
NULL
,
NULL
);
SetLastError
(
0xdeadbeef
);
...
...
@@ -1879,7 +1880,19 @@ static void test_decode_msg_get_param(void)
sizeof
(
hashParam
));
check_param
(
"hash computed hash"
,
msg
,
CMSG_COMPUTED_HASH_PARAM
,
hashParam
,
sizeof
(
hashParam
));
size
=
strlen
(
szOID_RSA_data
)
+
1
;
/* Curiously, getting the hash of index 1 succeeds, even though there's
* only one hash.
*/
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
1
,
NULL
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
buf
=
CryptMemAlloc
(
size
);
if
(
buf
)
{
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
1
,
buf
,
&
size
);
ok
(
size
==
sizeof
(
hashParam
),
"Unexpected size %d
\n
"
,
size
);
ok
(
!
memcmp
(
buf
,
hashParam
,
size
),
"Unexpected value
\n
"
);
CryptMemFree
(
buf
);
}
check_param
(
"hash inner OID"
,
msg
,
CMSG_INNER_CONTENT_TYPE_PARAM
,
(
const
BYTE
*
)
szOID_RSA_data
,
strlen
(
szOID_RSA_data
)
+
1
);
version
=
CMSG_HASHED_DATA_V0
;
...
...
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