Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5fb28472
Commit
5fb28472
authored
Jun 15, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Jun 18, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Don't crash on Vista.
parent
d9dec068
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
30 deletions
+42
-30
main.c
dlls/crypt32/tests/main.c
+42
-30
No files found.
dlls/crypt32/tests/main.c
View file @
5fb28472
...
...
@@ -44,16 +44,20 @@ static void test_findAttribute(void)
ok
(
ret
==
NULL
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error was set to %08x
\n
"
,
GetLastError
());
/* crashes
SetLastError(0xdeadbeef);
ret = CertFindAttribute(NULL, 1, NULL);
*/
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindAttribute
(
NULL
,
1
,
&
attr
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
if
(
0
)
{
/* crashes */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindAttribute
(
NULL
,
1
,
NULL
);
/* returns NULL, last error is ERROR_INVALID_PARAMETER
* crashes on Vista
*/
SetLastError
(
0xdeadbeef
);
ret
=
CertFindAttribute
(
NULL
,
1
,
&
attr
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
}
/* returns NULL, last error not set */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindAttribute
(
"bogus"
,
1
,
&
attr
);
...
...
@@ -85,16 +89,20 @@ static void test_findExtension(void)
ok
(
ret
==
NULL
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Last error was set to %08x
\n
"
,
GetLastError
());
/* crashes
SetLastError(0xdeadbeef);
ret = CertFindExtension(NULL, 1, NULL);
*/
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindExtension
(
NULL
,
1
,
&
ext
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
if
(
0
)
{
/* crashes */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindExtension
(
NULL
,
1
,
NULL
);
/* returns NULL, last error is ERROR_INVALID_PARAMETER
* crashes on Vista
*/
SetLastError
(
0xdeadbeef
);
ret
=
CertFindExtension
(
NULL
,
1
,
&
ext
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
}
/* returns NULL, last error not set */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindExtension
(
"bogus"
,
1
,
&
ext
);
...
...
@@ -126,16 +134,20 @@ static void test_findRDNAttr(void)
};
CERT_NAME_INFO
nameInfo
=
{
sizeof
(
rdns
)
/
sizeof
(
rdns
[
0
]),
rdns
};
/* crashes
SetLastError(0xdeadbeef);
ret = CertFindRDNAttr(NULL, NULL);
*/
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindRDNAttr
(
NULL
,
&
nameInfo
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
if
(
0
)
{
/* crashes */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindRDNAttr
(
NULL
,
NULL
);
/* returns NULL, last error is ERROR_INVALID_PARAMETER
* crashes on Vista
*/
SetLastError
(
0xdeadbeef
);
ret
=
CertFindRDNAttr
(
NULL
,
&
nameInfo
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)
\n
"
,
GetLastError
(),
GetLastError
());
}
/* returns NULL, last error not set */
SetLastError
(
0xdeadbeef
);
ret
=
CertFindRDNAttr
(
"bogus"
,
&
nameInfo
);
...
...
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