forked from Mirrors/wine-wine
crypt32: Use public type and APIs for memory stores wherever possible.
parent
afc50ce3fe
commit
bc37988dff
|
@ -156,31 +156,31 @@ typedef struct _WINE_HASH_TO_DELETE
|
||||||
|
|
||||||
typedef struct _WINE_REGSTOREINFO
|
typedef struct _WINE_REGSTOREINFO
|
||||||
{
|
{
|
||||||
DWORD dwOpenFlags;
|
DWORD dwOpenFlags;
|
||||||
HCRYPTPROV cryptProv;
|
HCRYPTPROV cryptProv;
|
||||||
PWINECRYPT_CERTSTORE memStore;
|
HCERTSTORE memStore;
|
||||||
HKEY key;
|
HKEY key;
|
||||||
BOOL dirty;
|
BOOL dirty;
|
||||||
CRITICAL_SECTION cs;
|
CRITICAL_SECTION cs;
|
||||||
struct list certsToDelete;
|
struct list certsToDelete;
|
||||||
struct list crlsToDelete;
|
struct list crlsToDelete;
|
||||||
} WINE_REGSTOREINFO, *PWINE_REGSTOREINFO;
|
} WINE_REGSTOREINFO, *PWINE_REGSTOREINFO;
|
||||||
|
|
||||||
typedef struct _WINE_FILESTOREINFO
|
typedef struct _WINE_FILESTOREINFO
|
||||||
{
|
{
|
||||||
DWORD dwOpenFlags;
|
DWORD dwOpenFlags;
|
||||||
HCRYPTPROV cryptProv;
|
HCRYPTPROV cryptProv;
|
||||||
PWINECRYPT_CERTSTORE memStore;
|
HCERTSTORE memStore;
|
||||||
HANDLE file;
|
HANDLE file;
|
||||||
BOOL dirty;
|
BOOL dirty;
|
||||||
} WINE_FILESTOREINFO, *PWINE_FILESTOREINFO;
|
} WINE_FILESTOREINFO, *PWINE_FILESTOREINFO;
|
||||||
|
|
||||||
typedef struct _WINE_MSGSTOREINFO
|
typedef struct _WINE_MSGSTOREINFO
|
||||||
{
|
{
|
||||||
DWORD dwOpenFlags;
|
DWORD dwOpenFlags;
|
||||||
HCRYPTPROV cryptProv;
|
HCRYPTPROV cryptProv;
|
||||||
PWINECRYPT_CERTSTORE memStore;
|
HCERTSTORE memStore;
|
||||||
HCRYPTMSG msg;
|
HCRYPTMSG msg;
|
||||||
} WINE_MSGSTOREINFO, *PWINE_MSGSTOREINFO;
|
} WINE_MSGSTOREINFO, *PWINE_MSGSTOREINFO;
|
||||||
|
|
||||||
typedef struct _WINE_STORE_LIST_ENTRY
|
typedef struct _WINE_STORE_LIST_ENTRY
|
||||||
|
@ -1421,7 +1421,8 @@ static WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv,
|
||||||
{
|
{
|
||||||
PWINECRYPT_CERTSTORE memStore;
|
PWINECRYPT_CERTSTORE memStore;
|
||||||
|
|
||||||
memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL);
|
memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv,
|
||||||
|
CERT_STORE_CREATE_NEW_FLAG, NULL);
|
||||||
if (memStore)
|
if (memStore)
|
||||||
{
|
{
|
||||||
PWINE_REGSTOREINFO regInfo = CryptMemAlloc(
|
PWINE_REGSTOREINFO regInfo = CryptMemAlloc(
|
||||||
|
@ -1827,7 +1828,8 @@ static PWINECRYPT_CERTSTORE CRYPT_FileOpenStore(HCRYPTPROV hCryptProv,
|
||||||
{
|
{
|
||||||
PWINECRYPT_CERTSTORE memStore;
|
PWINECRYPT_CERTSTORE memStore;
|
||||||
|
|
||||||
memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL);
|
memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv,
|
||||||
|
CERT_STORE_CREATE_NEW_FLAG, NULL);
|
||||||
if (memStore)
|
if (memStore)
|
||||||
{
|
{
|
||||||
if (CRYPT_ReadSerializedFile(file, memStore))
|
if (CRYPT_ReadSerializedFile(file, memStore))
|
||||||
|
@ -1963,7 +1965,8 @@ static PWINECRYPT_CERTSTORE CRYPT_MsgOpenStore(HCRYPTPROV hCryptProv,
|
||||||
|
|
||||||
TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara);
|
TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara);
|
||||||
|
|
||||||
memStore = CRYPT_MemOpenStore(hCryptProv, dwFlags, NULL);
|
memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv,
|
||||||
|
CERT_STORE_CREATE_NEW_FLAG, NULL);
|
||||||
if (memStore)
|
if (memStore)
|
||||||
{
|
{
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
|
|
Loading…
Reference in New Issue