Commit abc2aec8 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

crypt32: Use I_CertUpdateStore in registry stores.

parent 4d203fe9
...@@ -233,7 +233,6 @@ typedef struct WINE_CRYPTCERTSTORE ...@@ -233,7 +233,6 @@ typedef struct WINE_CRYPTCERTSTORE
void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags, void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
CertStoreType type); CertStoreType type);
void CRYPT_FreeStore(PWINECRYPT_CERTSTORE store); void CRYPT_FreeStore(PWINECRYPT_CERTSTORE store);
void CRYPT_EmptyStore(HCERTSTORE store);
BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0, BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0,
DWORD unk1); DWORD unk1);
......
...@@ -442,11 +442,17 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags, ...@@ -442,11 +442,17 @@ static BOOL WINAPI CRYPT_RegControl(HCERTSTORE hCertStore, DWORD dwFlags,
switch (dwCtrlType) switch (dwCtrlType)
{ {
case CERT_STORE_CTRL_RESYNC: case CERT_STORE_CTRL_RESYNC:
{
HCERTSTORE memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);
CRYPT_RegFlushStore(store, FALSE); CRYPT_RegFlushStore(store, FALSE);
CRYPT_EmptyStore(store->memStore); CRYPT_RegReadFromReg(store->key, memStore);
CRYPT_RegReadFromReg(store->key, store->memStore); I_CertUpdateStore(store->memStore, memStore, 0, 0);
CertCloseStore(memStore, 0);
ret = TRUE; ret = TRUE;
break; break;
}
case CERT_STORE_CTRL_COMMIT: case CERT_STORE_CTRL_COMMIT:
ret = CRYPT_RegFlushStore(store, ret = CRYPT_RegFlushStore(store,
dwFlags & CERT_STORE_CTRL_COMMIT_FORCE_FLAG); dwFlags & CERT_STORE_CTRL_COMMIT_FORCE_FLAG);
......
...@@ -199,7 +199,7 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext) ...@@ -199,7 +199,7 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext)
return TRUE; return TRUE;
} }
void CRYPT_EmptyStore(HCERTSTORE store) static void CRYPT_EmptyStore(HCERTSTORE store)
{ {
PCCERT_CONTEXT cert; PCCERT_CONTEXT cert;
PCCRL_CONTEXT crl; PCCRL_CONTEXT crl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment