From 8949d29de2c31ce4839d3ae4d9588b2fb0320406 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 2 Mar 2006 06:55:45 -0800 Subject: [PATCH] crypt32: Implement CertDuplicateStore. --- dlls/crypt32/crypt32.spec | 2 +- dlls/crypt32/store.c | 10 ++++++++++ include/wincrypt.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/crypt32/crypt32.spec b/dlls/crypt32/crypt32.spec index abeff355922..7d403943011 100644 --- a/dlls/crypt32/crypt32.spec +++ b/dlls/crypt32/crypt32.spec @@ -26,7 +26,7 @@ @ stub CertDuplicateCRLContext @ stub CertDuplicateCTLContext @ stdcall CertDuplicateCertificateContext(ptr) -@ stub CertDuplicateStore +@ stdcall CertDuplicateStore(ptr) @ stub CertEnumCRLContextProperties @ stdcall CertEnumCRLsInStore(ptr ptr) @ stub CertEnumCTLContextProperties diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 47e595ce9dd..b8a3d0f809d 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -2626,6 +2626,16 @@ PCCTL_CONTEXT WINAPI CertEnumCTLsInStore(HCERTSTORE hCertStore, return NULL; } +HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore) +{ + WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore; + + TRACE("(%p)\n", hCertStore); + + if (hcs && hcs->dwMagic == WINE_CRYPTCERTSTORE_MAGIC) + InterlockedIncrement(&hcs->ref); + return hCertStore; +} BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) { diff --git a/include/wincrypt.h b/include/wincrypt.h index 678f46620af..9784223e9bc 100644 --- a/include/wincrypt.h +++ b/include/wincrypt.h @@ -2605,6 +2605,8 @@ BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId, BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags, DWORD dwCtrlType, void const *pvCtrlPara); +HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore); + BOOL WINAPI CertCloseStore( HCERTSTORE hCertStore, DWORD dwFlags ); BOOL WINAPI CertFreeCertificateContext( PCCERT_CONTEXT pCertContext ); -- 2.11.4.GIT