Juan Lang : crypt32: Add CTLs to the registry store.
Alexandre Julliard
julliard at winehq.org
Tue Sep 2 08:32:51 CDT 2008
Module: wine
Branch: master
Commit: dc7a4e1302b3c1cfad5d7dc7b71e5c2c93325eb0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc7a4e1302b3c1cfad5d7dc7b71e5c2c93325eb0
Author: Juan Lang <juan.lang at gmail.com>
Date: Fri Aug 29 07:33:24 2008 -0700
crypt32: Add CTLs to the registry store.
---
dlls/crypt32/regstore.c | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/dlls/crypt32/regstore.c b/dlls/crypt32/regstore.c
index 35928b8..5574a5e 100644
--- a/dlls/crypt32/regstore.c
+++ b/dlls/crypt32/regstore.c
@@ -43,6 +43,7 @@ typedef struct _WINE_REGSTOREINFO
CRITICAL_SECTION cs;
struct list certsToDelete;
struct list crlsToDelete;
+ struct list ctlsToDelete;
} WINE_REGSTOREINFO, *PWINE_REGSTOREINFO;
static void CRYPT_HashToStr(const BYTE *hash, LPWSTR asciiHash)
@@ -251,7 +252,7 @@ static BOOL CRYPT_RegWriteToReg(PWINE_REGSTOREINFO store)
const WINE_CONTEXT_INTERFACE * const interfaces[] = { pCertInterface,
pCRLInterface, pCTLInterface };
struct list *listToDelete[] = { &store->certsToDelete, &store->crlsToDelete,
- NULL };
+ &store->ctlsToDelete };
BOOL ret = TRUE;
DWORD i;
@@ -430,6 +431,27 @@ static BOOL WINAPI CRYPT_RegDeleteCRL(HCERTSTORE hCertStore,
pCRLInterface);
}
+static BOOL WINAPI CRYPT_RegWriteCTL(HCERTSTORE hCertStore,
+ PCCTL_CONTEXT ctl, DWORD dwFlags)
+{
+ PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
+
+ TRACE("(%p, %p, %d)\n", hCertStore, ctl, dwFlags);
+
+ return CRYPT_RegWriteContext(store, ctl, dwFlags);
+}
+
+static BOOL WINAPI CRYPT_RegDeleteCTL(HCERTSTORE hCertStore,
+ PCCTL_CONTEXT pCtlContext, DWORD dwFlags)
+{
+ PWINE_REGSTOREINFO store = (PWINE_REGSTOREINFO)hCertStore;
+
+ TRACE("(%p, %p, %08x)\n", store, pCtlContext, dwFlags);
+
+ return CRYPT_RegDeleteContext(store, &store->ctlsToDelete, pCtlContext,
+ pCTLInterface);
+}
+
static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags,
DWORD dwCtrlType, void const *pvCtrlPara)
{
@@ -475,8 +497,8 @@ static void *regProvFuncs[] = {
CRYPT_RegDeleteCRL,
NULL, /* CERT_STORE_PROV_SET_CRL_PROPERTY_FUNC */
NULL, /* CERT_STORE_PROV_READ_CTL_FUNC */
- NULL, /* CERT_STORE_PROV_WRITE_CTL_FUNC */
- NULL, /* CERT_STORE_PROV_DELETE_CTL_FUNC */
+ CRYPT_RegWriteCTL,
+ CRYPT_RegDeleteCTL,
NULL, /* CERT_STORE_PROV_SET_CTL_PROPERTY_FUNC */
CRYPT_RegControl,
};
@@ -529,6 +551,7 @@ PWINECRYPT_CERTSTORE CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
regInfo->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs");
list_init(®Info->certsToDelete);
list_init(®Info->crlsToDelete);
+ list_init(®Info->ctlsToDelete);
CRYPT_RegReadFromReg(regInfo->key, regInfo->memStore);
regInfo->dirty = FALSE;
provInfo.cbSize = sizeof(provInfo);
More information about the wine-cvs
mailing list