mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 11:08:45 +00:00
crypt32/tests: Don't crash on Vista.
This commit is contained in:
parent
d9dec068c3
commit
5fb284721d
1 changed files with 42 additions and 30 deletions
|
@ -44,16 +44,20 @@ static void test_findAttribute(void)
|
||||||
ok(ret == NULL, "Expected failure\n");
|
ok(ret == NULL, "Expected failure\n");
|
||||||
ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n",
|
ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
/* crashes
|
if (0)
|
||||||
SetLastError(0xdeadbeef);
|
{
|
||||||
ret = CertFindAttribute(NULL, 1, NULL);
|
/* crashes */
|
||||||
*/
|
SetLastError(0xdeadbeef);
|
||||||
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
|
ret = CertFindAttribute(NULL, 1, NULL);
|
||||||
SetLastError(0xdeadbeef);
|
/* returns NULL, last error is ERROR_INVALID_PARAMETER
|
||||||
ret = CertFindAttribute(NULL, 1, &attr);
|
* crashes on Vista
|
||||||
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
|
*/
|
||||||
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(),
|
SetLastError(0xdeadbeef);
|
||||||
GetLastError());
|
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 */
|
/* returns NULL, last error not set */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CertFindAttribute("bogus", 1, &attr);
|
ret = CertFindAttribute("bogus", 1, &attr);
|
||||||
|
@ -85,16 +89,20 @@ static void test_findExtension(void)
|
||||||
ok(ret == NULL, "Expected failure\n");
|
ok(ret == NULL, "Expected failure\n");
|
||||||
ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n",
|
ok(GetLastError() == 0xdeadbeef, "Last error was set to %08x\n",
|
||||||
GetLastError());
|
GetLastError());
|
||||||
/* crashes
|
if (0)
|
||||||
SetLastError(0xdeadbeef);
|
{
|
||||||
ret = CertFindExtension(NULL, 1, NULL);
|
/* crashes */
|
||||||
*/
|
SetLastError(0xdeadbeef);
|
||||||
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
|
ret = CertFindExtension(NULL, 1, NULL);
|
||||||
SetLastError(0xdeadbeef);
|
/* returns NULL, last error is ERROR_INVALID_PARAMETER
|
||||||
ret = CertFindExtension(NULL, 1, &ext);
|
* crashes on Vista
|
||||||
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
|
*/
|
||||||
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(),
|
SetLastError(0xdeadbeef);
|
||||||
GetLastError());
|
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 */
|
/* returns NULL, last error not set */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CertFindExtension("bogus", 1, &ext);
|
ret = CertFindExtension("bogus", 1, &ext);
|
||||||
|
@ -126,16 +134,20 @@ static void test_findRDNAttr(void)
|
||||||
};
|
};
|
||||||
CERT_NAME_INFO nameInfo = { sizeof(rdns) / sizeof(rdns[0]), rdns };
|
CERT_NAME_INFO nameInfo = { sizeof(rdns) / sizeof(rdns[0]), rdns };
|
||||||
|
|
||||||
/* crashes
|
if (0)
|
||||||
SetLastError(0xdeadbeef);
|
{
|
||||||
ret = CertFindRDNAttr(NULL, NULL);
|
/* crashes */
|
||||||
*/
|
SetLastError(0xdeadbeef);
|
||||||
/* returns NULL, last error is ERROR_INVALID_PARAMETER */
|
ret = CertFindRDNAttr(NULL, NULL);
|
||||||
SetLastError(0xdeadbeef);
|
/* returns NULL, last error is ERROR_INVALID_PARAMETER
|
||||||
ret = CertFindRDNAttr(NULL, &nameInfo);
|
* crashes on Vista
|
||||||
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
|
*/
|
||||||
"Expected ERROR_INVALID_PARAMETER, got %d (%08x)\n", GetLastError(),
|
SetLastError(0xdeadbeef);
|
||||||
GetLastError());
|
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 */
|
/* returns NULL, last error not set */
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = CertFindRDNAttr("bogus", &nameInfo);
|
ret = CertFindRDNAttr("bogus", &nameInfo);
|
||||||
|
|
Loading…
Reference in a new issue