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
e8298339
Commit
e8298339
authored
Jun 28, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jun 29, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Test CryptMsgGetParam for data messages opened to encode.
parent
bd05e2ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
msg.c
dlls/crypt32/tests/msg.c
+38
-0
No files found.
dlls/crypt32/tests/msg.c
View file @
e8298339
...
...
@@ -361,10 +361,48 @@ static void test_data_msg_update(void)
CryptMsgClose
(
msg
);
}
static
void
test_data_msg_get_param
(
void
)
{
HCRYPTMSG
msg
;
DWORD
size
;
BOOL
ret
;
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_DATA
,
NULL
,
NULL
,
NULL
);
/* Content and bare content are always gettable */
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_CONTENT_PARAM
,
0
,
NULL
,
&
size
);
todo_wine
{
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
size
=
0
;
ret
=
CryptMsgGetParam
(
msg
,
CMSG_BARE_CONTENT_PARAM
,
0
,
NULL
,
&
size
);
ok
(
ret
,
"CryptMsgGetParam failed: %08x
\n
"
,
GetLastError
());
/* But for this type of message, the signer and hash aren't applicable,
* and the type isn't available.
*/
size
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_ENCODED_SIGNER
,
0
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_INVALID_MSG_TYPE
,
"Expected CRYPT_E_INVALID_MSG_TYPE, got %x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgGetParam
(
msg
,
CMSG_COMPUTED_HASH_PARAM
,
0
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_INVALID_MSG_TYPE
,
"Expected CRYPT_E_INVALID_MSG_TYPE, got %x
\n
"
,
GetLastError
());
ret
=
CryptMsgGetParam
(
msg
,
CMSG_TYPE_PARAM
,
0
,
NULL
,
&
size
);
ok
(
!
ret
&&
GetLastError
()
==
CRYPT_E_INVALID_MSG_TYPE
,
"Expected CRYPT_E_INVALID_MSG_TYPE, got %x
\n
"
,
GetLastError
());
}
CryptMsgClose
(
msg
);
}
static
void
test_data_msg
(
void
)
{
test_data_msg_open
();
test_data_msg_update
();
test_data_msg_get_param
();
}
START_TEST
(
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