Commit 99b9e1ae authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Prohibit adding links to collection stores.

parent 76fc5c8b
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment