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
b12072b7
Commit
b12072b7
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: Add open tests for hash messages.
parent
afaba37e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
msg.c
dlls/crypt32/tests/msg.c
+33
-0
No files found.
dlls/crypt32/tests/msg.c
View file @
b12072b7
...
...
@@ -653,6 +653,38 @@ static void test_data_msg(void)
test_data_msg_encoding
();
}
static
void
test_hash_msg_open
(
void
)
{
HCRYPTMSG
msg
;
CMSG_HASHED_ENCODE_INFO
hashInfo
=
{
0
};
static
char
oid_rsa_md5
[]
=
szOID_RSA_MD5
;
SetLastError
(
0xdeadbeef
);
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_HASHED
,
&
hashInfo
,
NULL
,
NULL
);
todo_wine
ok
(
!
msg
&&
GetLastError
()
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %x
\n
"
,
GetLastError
());
hashInfo
.
cbSize
=
sizeof
(
hashInfo
);
SetLastError
(
0xdeadbeef
);
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_HASHED
,
&
hashInfo
,
NULL
,
NULL
);
todo_wine
ok
(
!
msg
&&
GetLastError
()
==
CRYPT_E_UNKNOWN_ALGO
,
"Expected CRYPT_E_UNKNOWN_ALGO, got %x
\n
"
,
GetLastError
());
hashInfo
.
HashAlgorithm
.
pszObjId
=
oid_rsa_md5
;
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_HASHED
,
&
hashInfo
,
NULL
,
NULL
);
todo_wine
ok
(
msg
!=
NULL
,
"CryptMsgOpenToEncode failed: %x
\n
"
,
GetLastError
());
CryptMsgClose
(
msg
);
}
static
void
test_hash_msg
(
void
)
{
test_hash_msg_open
();
}
static
CRYPT_DATA_BLOB
b4
=
{
0
,
NULL
};
static
const
struct
update_accum
a4
=
{
1
,
&
b4
};
...
...
@@ -832,5 +864,6 @@ START_TEST(msg)
/* Message-type specific tests */
test_data_msg
();
test_hash_msg
();
test_decode_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