wintrust/tests: Accept the CryptCATAdminAcquireContext win8 results.
This commit is contained in:
parent
55928a90e5
commit
48ae4314d0
|
@ -113,7 +113,7 @@ BOOL WINAPI CryptCATAdminAcquireContext(HCATADMIN *catAdmin,
|
||||||
|
|
||||||
TRACE("%p %s %x\n", catAdmin, debugstr_guid(sys), dwFlags);
|
TRACE("%p %s %x\n", catAdmin, debugstr_guid(sys), dwFlags);
|
||||||
|
|
||||||
if (!catAdmin)
|
if (!catAdmin || dwFlags)
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INVALID_PARAMETER);
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -284,13 +284,21 @@ static void test_context(void)
|
||||||
ret = pCryptCATAdminReleaseContext(hca, 0);
|
ret = pCryptCATAdminReleaseContext(hca, 0);
|
||||||
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
|
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
|
||||||
|
|
||||||
/* Flags not equal to 0 */
|
hca = (void *) 0xdeadbeef;
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
/* Flags is documented as unused, but the parameter is checked since win8 */
|
||||||
ret = pCryptCATAdminAcquireContext(&hca, &unknown, 1);
|
ret = pCryptCATAdminAcquireContext(&hca, &unknown, 1);
|
||||||
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
|
ok((!ret && (GetLastError() == ERROR_INVALID_PARAMETER) && (hca == (void *) 0xdeadbeef)) ||
|
||||||
ok(hca != NULL, "Expected a context handle, got NULL\n");
|
broken(ret && hca != NULL && hca != (void *) 0xdeadbeef),
|
||||||
|
"Expected FALSE and ERROR_INVALID_PARAMETER with untouched handle, got %d and %u with %p\n",
|
||||||
|
ret, GetLastError(), hca);
|
||||||
|
|
||||||
ret = pCryptCATAdminReleaseContext(hca, 0);
|
if (ret && hca)
|
||||||
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
|
{
|
||||||
|
SetLastError(0xdeadbeef);
|
||||||
|
ret = pCryptCATAdminReleaseContext(hca, 0);
|
||||||
|
ok(ret, "Expected success, got FALSE with %d\n", GetLastError());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Check whether SHA-1 is the algorithm that's always used */
|
/* TODO: Check whether SHA-1 is the algorithm that's always used */
|
||||||
|
|
Loading…
Reference in New Issue