Module: wine Branch: master Commit: 9c55a71f8f5bfaf726ad637b31d6267a931adf5d URL: http://source.winehq.org/git/wine.git/?a=commit;h=9c55a71f8f5bfaf726ad637b31...
Author: Juan Lang juan.lang@gmail.com Date: Thu Sep 27 14:01:30 2007 -0700
crypt32: Use CertSaveStore to save file stores.
---
dlls/crypt32/filestore.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/filestore.c b/dlls/crypt32/filestore.c index df4b98d..63a7b6e 100644 --- a/dlls/crypt32/filestore.c +++ b/dlls/crypt32/filestore.c @@ -39,7 +39,8 @@ static void WINAPI CRYPT_FileCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
TRACE("(%p, %08x)\n", store, dwFlags); if (store->dirty) - CRYPT_WriteSerializedStoreToFile(store->file, store->memStore); + CertSaveStore(store->memStore, X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + CERT_STORE_SAVE_AS_STORE, CERT_STORE_SAVE_TO_FILE, store->file, 0); CertCloseStore(store->memStore, dwFlags); CloseHandle(store->file); CryptMemFree(store); @@ -108,7 +109,9 @@ static BOOL WINAPI CRYPT_FileControl(HCERTSTORE hCertStore, DWORD dwFlags, ret = FALSE; } else if (store->dirty) - ret = CRYPT_WriteSerializedStoreToFile(store->file, store->memStore); + ret = CertSaveStore(store->memStore, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, + CERT_STORE_SAVE_AS_STORE, CERT_STORE_SAVE_TO_FILE, store->file, 0); else ret = TRUE; break;