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 );