advapi32: Skip tests if the default provider cannot be removed.

This commit is contained in:
James Hawkins 2009-01-26 01:31:00 -06:00 committed by Alexandre Julliard
parent 8322bd78e8
commit a072f85b9f

View File

@ -870,12 +870,13 @@ static void test_set_provider_ex(void)
/* remove the default provider and then set it to MS_DEF_PROV/PROV_RSA_FULL */
SetLastError(0xdeadbeef);
result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT | CRYPT_DELETE_DEFAULT);
if (!result && (GetLastError() == ERROR_ACCESS_DENIED))
if (!result)
{
ok( GetLastError() == ERROR_ACCESS_DENIED || broken(GetLastError() == ERROR_INVALID_PARAMETER),
"wrong error %u\n", GetLastError() );
skip("Not enough rights to remove the default provider\n");
return;
}
ok(result, "%d\n", GetLastError());
result = pCryptSetProviderExA(MS_DEF_PROV, PROV_RSA_FULL, NULL, CRYPT_MACHINE_DEFAULT);
ok(result, "%d\n", GetLastError());