crypt32: Add CTLs to the registry store.
This commit is contained in:
parent
ec1e1b30cd
commit
dc7a4e1302
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue