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
1461b2c1
Commit
1461b2c1
authored
Feb 28, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Don't crash on NT4.
parent
4362e840
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
msg.c
dlls/crypt32/tests/msg.c
+14
-6
No files found.
dlls/crypt32/tests/msg.c
View file @
1461b2c1
...
...
@@ -2635,6 +2635,14 @@ static void test_msg_control(void)
CMSG_HASHED_ENCODE_INFO
hashInfo
=
{
0
};
CMSG_SIGNED_ENCODE_INFO
signInfo
=
{
sizeof
(
signInfo
),
0
};
CMSG_CTRL_DECRYPT_PARA
decryptPara
=
{
sizeof
(
decryptPara
),
0
};
BOOL
old_crypt32
=
FALSE
;
/* I_CertUpdateStore can be used for verification if crypt32 is new enough */
if
(
!
GetProcAddress
(
GetModuleHandleA
(
"crypt32.dll"
),
"I_CertUpdateStore"
))
{
win_skip
(
"Some tests will crash on older crypt32 implementations
\n
"
);
old_crypt32
=
TRUE
;
}
/* Crashes
ret = CryptMsgControl(NULL, 0, 0, NULL);
...
...
@@ -2644,7 +2652,7 @@ static void test_msg_control(void)
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_DATA
,
NULL
,
NULL
,
NULL
);
/* either with no prior update.. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
@@ -2653,7 +2661,7 @@ static void test_msg_control(void)
}
ret
=
CryptMsgUpdate
(
msg
,
NULL
,
0
,
TRUE
);
/* or after an update. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
@@ -2668,7 +2676,7 @@ static void test_msg_control(void)
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_HASHED
,
&
hashInfo
,
NULL
,
NULL
);
/* either with no prior update.. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
@@ -2677,7 +2685,7 @@ static void test_msg_control(void)
}
ret
=
CryptMsgUpdate
(
msg
,
NULL
,
0
,
TRUE
);
/* or after an update. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
@@ -2691,7 +2699,7 @@ static void test_msg_control(void)
msg
=
CryptMsgOpenToEncode
(
PKCS_7_ASN_ENCODING
,
0
,
CMSG_SIGNED
,
&
signInfo
,
NULL
,
NULL
);
/* either before an update.. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
@@ -2700,7 +2708,7 @@ static void test_msg_control(void)
}
ret
=
CryptMsgUpdate
(
msg
,
NULL
,
0
,
TRUE
);
/* or after an update. */
for
(
i
=
1
;
have_nt
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
for
(
i
=
1
;
!
old_crypt32
&&
(
i
<=
CMSG_CTRL_ADD_CMS_SIGNER_INFO
);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
CryptMsgControl
(
msg
,
0
,
i
,
NULL
);
...
...
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