Juan Lang : crypt32: Implement CertDeleteCTLFromStore.

Alexandre Julliard julliard at winehq.org
Tue Sep 2 08:32:51 CDT 2008


Module: wine
Branch: master
Commit: 7a2cedadbcd7ce32dc552e467d26c8423345500a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7a2cedadbcd7ce32dc552e467d26c8423345500a

Author: Juan Lang <juan.lang at gmail.com>
Date:   Fri Aug 29 07:34:33 2008 -0700

crypt32: Implement CertDeleteCTLFromStore.

---

 dlls/crypt32/ctl.c   |   27 +++++++++++++++++++++++++++
 dlls/crypt32/store.c |    6 ------
 2 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/dlls/crypt32/ctl.c b/dlls/crypt32/ctl.c
index e7c048e..864f56d 100644
--- a/dlls/crypt32/ctl.c
+++ b/dlls/crypt32/ctl.c
@@ -68,6 +68,33 @@ PCCTL_CONTEXT WINAPI CertEnumCTLsInStore(HCERTSTORE hCertStore,
     return ret;
 }
 
+BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
+{
+    BOOL ret;
+
+    TRACE("(%p)\n", pCtlContext);
+
+    if (!pCtlContext)
+        ret = TRUE;
+    else if (!pCtlContext->hCertStore)
+    {
+        ret = TRUE;
+        CertFreeCTLContext(pCtlContext);
+    }
+    else
+    {
+        PWINECRYPT_CERTSTORE hcs =
+         (PWINECRYPT_CERTSTORE)pCtlContext->hCertStore;
+
+        if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
+            ret = FALSE;
+        else
+            ret = hcs->ctls.deleteContext(hcs, (void *)pCtlContext);
+        CertFreeCTLContext(pCtlContext);
+    }
+    return ret;
+}
+
 PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType,
  const BYTE *pbCtlEncoded, DWORD cbCtlEncoded)
 {
diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c
index fbc4133..180740c 100644
--- a/dlls/crypt32/store.c
+++ b/dlls/crypt32/store.c
@@ -1100,12 +1100,6 @@ BOOL WINAPI CertAddCTLContextToStore(HCERTSTORE hCertStore,
     return TRUE;
 }
 
-BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
-{
-    FIXME("(%p): stub\n", pCtlContext);
-    return TRUE;
-}
-
 HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
 {
     WINECRYPT_CERTSTORE *hcs = (WINECRYPT_CERTSTORE *)hCertStore;




More information about the wine-cvs mailing list