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
c2f8191a
Commit
c2f8191a
authored
Jul 12, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Simplify hash value tests.
parent
bb1246a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
33 deletions
+7
-33
msg.c
dlls/crypt32/tests/msg.c
+7
-33
No files found.
dlls/crypt32/tests/msg.c
View file @
c2f8191a
...
...
@@ -781,19 +781,13 @@ static void test_hash_msg_get_param(void)
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
buf
,
&
size
);
if
(
size
==
sizeof
(
buf
))
ok
(
!
memcmp
(
buf
,
emptyHashParam
,
size
),
"Unexpected value
\n
"
);
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
NULL
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
buf
),
"Unexpected size %d
\n
"
,
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
buf
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
/* The hash doesn't seem to change even after an update, which matches
* how rsaenh behaves - an update can't happen after the has is retrieved.
*/
ok
(
!
memcmp
(
buf
,
emptyHashParam
,
size
),
"Unexpected value
\n
"
);
/* So is the version. */
/* By getting the hash, further updates are not allowed */
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
TRUE
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
NTE_BAD_HASH_STATE
,
"Expected NTE_BAD_HASH_STATE, got %x
\n
"
,
GetLastError
());
/* The version is also available, and should be zero for this message. */
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_VERSION_PARAM
,
0
,
NULL
,
&
size
);
todo_wine
...
...
@@ -833,26 +827,6 @@ static void test_hash_msg_get_param(void)
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
if
(
size
==
sizeof
(
buf
))
ok
(
!
memcmp
(
buf
,
emptyHashParam
,
size
),
"Unexpected value
\n
"
);
/* An empty update has no effect on the hash */
CryptMsgUpdate
(
msg
,
NULL
,
0
,
FALSE
);
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
NULL
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
buf
),
"Unexpected size %d
\n
"
,
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
buf
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
if
(
size
==
sizeof
(
buf
))
ok
(
!
memcmp
(
buf
,
emptyHashParam
,
size
),
"Unexpected value
\n
"
);
/* A non-empty update doesn't either - see above comments. */
CryptMsgUpdate
(
msg
,
msgData
,
sizeof
(
msgData
),
FALSE
);
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
NULL
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
ok
(
size
==
sizeof
(
buf
),
"Unexpected size %d
\n
"
,
size
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
buf
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
if
(
size
==
sizeof
(
buf
))
ok
(
!
memcmp
(
buf
,
emptyHashParam
,
size
),
"Unexpected value
\n
"
);
CryptMsgClose
(
msg
);
}
...
...
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