mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 04:39:45 +00:00
wintrust: Implement CryptCATAdminReleaseContext.
Based on work done by Maarten Lankhorst.
This commit is contained in:
parent
1d9ce08ce2
commit
a99ef3570f
@ -183,8 +183,17 @@ BOOL WINAPI CryptCATAdminReleaseCatalogContext(HCATADMIN hCatAdmin,
|
||||
*/
|
||||
BOOL WINAPI CryptCATAdminReleaseContext(HCATADMIN hCatAdmin, DWORD dwFlags )
|
||||
{
|
||||
FIXME("%p %x\n", hCatAdmin, dwFlags);
|
||||
return TRUE;
|
||||
struct catadmin *ca = hCatAdmin;
|
||||
|
||||
TRACE("%p %x\n", hCatAdmin, dwFlags);
|
||||
|
||||
if (!ca || ca->magic != CATADMIN_MAGIC)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
ca->magic = 0;
|
||||
return HeapFree(GetProcessHeap(), 0, ca);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -109,12 +109,9 @@ static void test_context(void)
|
||||
/* All NULL */
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pCryptCATAdminReleaseContext(NULL, 0);
|
||||
todo_wine
|
||||
{
|
||||
ok(!ret, "Expected failure\n");
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER,
|
||||
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
|
||||
}
|
||||
|
||||
/* Proper release */
|
||||
SetLastError(0xdeadbeef);
|
||||
@ -126,12 +123,9 @@ static void test_context(void)
|
||||
/* Try to release a second time */
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = pCryptCATAdminReleaseContext(hca, 0);
|
||||
todo_wine
|
||||
{
|
||||
ok(!ret, "Expected failure\n");
|
||||
ok(GetLastError() == ERROR_INVALID_PARAMETER,
|
||||
"Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
|
||||
}
|
||||
|
||||
/* NULL context handle and dummy GUID */
|
||||
SetLastError(0xdeadbeef);
|
||||
|
Loading…
Reference in New Issue
Block a user