Juan Lang : crypt32: Prohibit adding links to collection stores.
Alexandre Julliard
julliard at winehq.org
Mon May 17 09:39:26 CDT 2010
Module: wine
Branch: master
Commit: 99b9e1ae3633f6d20bbc093b503d915f8e62e97c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=99b9e1ae3633f6d20bbc093b503d915f8e62e97c
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri May 14 15:44:17 2010 -0700
crypt32: Prohibit adding links to collection stores.
---
dlls/crypt32/cert.c | 9 +++++++++
dlls/crypt32/tests/store.c | 1 -
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index c25e612..3d4a34c 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -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;
}
diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c
index 72a2154..abc44e2 100644
--- a/dlls/crypt32/tests/store.c
+++ b/dlls/crypt32/tests/store.c
@@ -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);
More information about the wine-cvs
mailing list