crypt32: Prohibit adding links to collection stores.

This commit is contained in:
Juan Lang 2010-05-14 15:44:17 -07:00 committed by Alexandre Julliard
parent 76fc5c8bc5
commit 99b9e1ae36
2 changed files with 9 additions and 1 deletions

View File

@ -113,8 +113,17 @@ BOOL WINAPI CertAddCertificateLinkToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition,
PCCERT_CONTEXT *ppCertContext)
{
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore;
FIXME("(%p, %p, %08x, %p)\n", hCertStore, pCertContext, dwAddDisposition,
ppCertContext);
if (store->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
return FALSE;
if (store->type == StoreTypeCollection)
{
SetLastError(E_INVALIDARG);
return FALSE;
}
return FALSE;
}

View File

@ -2354,7 +2354,6 @@ static void testAddCertificateLink(void)
SetLastError(0xdeadbeef);
ret = CertAddCertificateLinkToStore(store1, source, CERT_STORE_ADD_ALWAYS,
&linked);
todo_wine
ok(!ret && GetLastError() == E_INVALIDARG,
"expected E_INVALIDARG, got %08x\n", GetLastError());
CertFreeCertificateContext(source);