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
fd05fe0d
Commit
fd05fe0d
authored
Jul 09, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Jul 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add more tests for opening a data message for encoding.
parent
dc63bf2d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
msg.c
dlls/crypt32/tests/msg.c
+26
-0
No files found.
dlls/crypt32/tests/msg.c
View file @
fd05fe0d
...
@@ -304,6 +304,8 @@ static void test_data_msg_open(void)
...
@@ -304,6 +304,8 @@ static void test_data_msg_open(void)
{
{
HCRYPTMSG
msg
;
HCRYPTMSG
msg
;
CMSG_HASHED_ENCODE_INFO
hashInfo
=
{
0
};
CMSG_HASHED_ENCODE_INFO
hashInfo
=
{
0
};
CMSG_STREAM_INFO
streamInfo
=
{
0
};
char
oid
[]
=
"1.2.3"
;
/* The data message type takes no additional info */
/* The data message type takes no additional info */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -315,6 +317,30 @@ static void test_data_msg_open(void)
...
@@ -315,6 +317,30 @@ static void test_data_msg_open(void)
NULL
);
NULL
);
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
CryptMsgClose
(
msg
);
/* An empty stream info is allowed. */
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_DATA
,
NULL
,
NULL
,
&
streamInfo
);
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
/* Passing a bogus inner OID succeeds for a non-streamed message.. */
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_DATA
,
NULL
,
oid
,
NULL
);
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
/* and still succeeds when CMSG_DETACHED_FLAG is passed.. */
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
CMSG_DETACHED_FLAG
,
CMSG_DATA
,
NULL
,
oid
,
NULL
);
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
/* and when a stream info is given, even though you're not supposed to be
* able to use anything but szOID_RSA_data when streaming is being used.
*/
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
CMSG_DETACHED_FLAG
,
CMSG_DATA
,
NULL
,
oid
,
&
streamInfo
);
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
}
}
static
const
BYTE
msgData
[]
=
{
1
,
2
,
3
,
4
};
static
const
BYTE
msgData
[]
=
{
1
,
2
,
3
,
4
};
...
...
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