crypt32: Get rid of PWINECRYPT_CERTSTORE typedef.

This commit is contained in:
Jacek Caban 2013-09-04 12:38:51 +02:00 committed by Alexandre Julliard
parent d8c3ccee28
commit 0c4a2df240
9 changed files with 87 additions and 88 deletions

View File

@ -114,7 +114,7 @@ BOOL WINAPI CertAddCertificateLinkToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT *ppCertContext) PCCERT_CONTEXT *ppCertContext)
{ {
static int calls; static int calls;
PWINECRYPT_CERTSTORE store = (PWINECRYPT_CERTSTORE)hCertStore; WINECRYPT_CERTSTORE *store = (WINECRYPT_CERTSTORE*)hCertStore;
if (!(calls++)) if (!(calls++))
FIXME("(%p, %p, %08x, %p): semi-stub\n", hCertStore, pCertContext, FIXME("(%p, %p, %08x, %p): semi-stub\n", hCertStore, pCertContext,

View File

@ -27,7 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(crypt);
typedef struct _WINE_STORE_LIST_ENTRY typedef struct _WINE_STORE_LIST_ENTRY
{ {
PWINECRYPT_CERTSTORE store; WINECRYPT_CERTSTORE *store;
DWORD dwUpdateFlags; DWORD dwUpdateFlags;
DWORD dwPriority; DWORD dwPriority;
struct list entry; struct list entry;
@ -184,7 +184,7 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
return ret; return ret;
} }
static BOOL CRYPT_CollectionAddCert(PWINECRYPT_CERTSTORE store, void *cert, static BOOL CRYPT_CollectionAddCert(WINECRYPT_CERTSTORE *store, void *cert,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
BOOL ret; BOOL ret;
@ -209,7 +209,7 @@ static BOOL CRYPT_CollectionAddCert(PWINECRYPT_CERTSTORE store, void *cert,
return ret; return ret;
} }
static void *CRYPT_CollectionEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_CollectionEnumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store; PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store;
void *ret; void *ret;
@ -251,7 +251,7 @@ static void *CRYPT_CollectionEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_CollectionDeleteCert(PWINECRYPT_CERTSTORE store, static BOOL CRYPT_CollectionDeleteCert(WINECRYPT_CERTSTORE *store,
void *pCertContext) void *pCertContext)
{ {
BOOL ret; BOOL ret;
@ -271,7 +271,7 @@ static BOOL CRYPT_CollectionDeleteCert(PWINECRYPT_CERTSTORE store,
return ret; return ret;
} }
static BOOL CRYPT_CollectionAddCRL(PWINECRYPT_CERTSTORE store, void *crl, static BOOL CRYPT_CollectionAddCRL(WINECRYPT_CERTSTORE *store, void *crl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
BOOL ret; BOOL ret;
@ -296,7 +296,7 @@ static BOOL CRYPT_CollectionAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
return ret; return ret;
} }
static void *CRYPT_CollectionEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_CollectionEnumCRL(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store; PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store;
void *ret; void *ret;
@ -337,8 +337,7 @@ static void *CRYPT_CollectionEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_CollectionDeleteCRL(PWINECRYPT_CERTSTORE store, static BOOL CRYPT_CollectionDeleteCRL(WINECRYPT_CERTSTORE *store, void *pCrlContext)
void *pCrlContext)
{ {
BOOL ret; BOOL ret;
PCCRL_CONTEXT linked; PCCRL_CONTEXT linked;
@ -356,7 +355,7 @@ static BOOL CRYPT_CollectionDeleteCRL(PWINECRYPT_CERTSTORE store,
return ret; return ret;
} }
static BOOL CRYPT_CollectionAddCTL(PWINECRYPT_CERTSTORE store, void *ctl, static BOOL CRYPT_CollectionAddCTL(WINECRYPT_CERTSTORE *store, void *ctl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
BOOL ret; BOOL ret;
@ -381,7 +380,7 @@ static BOOL CRYPT_CollectionAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
return ret; return ret;
} }
static void *CRYPT_CollectionEnumCTL(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_CollectionEnumCTL(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store; PWINE_COLLECTIONSTORE cs = (PWINE_COLLECTIONSTORE)store;
void *ret; void *ret;
@ -422,7 +421,7 @@ static void *CRYPT_CollectionEnumCTL(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_CollectionDeleteCTL(PWINECRYPT_CERTSTORE store, static BOOL CRYPT_CollectionDeleteCTL(WINECRYPT_CERTSTORE *store,
void *pCtlContext) void *pCtlContext)
{ {
BOOL ret; BOOL ret;
@ -480,7 +479,7 @@ static BOOL WINAPI CRYPT_CollectionControl(HCERTSTORE hCertStore, DWORD dwFlags,
return ret; return ret;
} }
PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
PWINE_COLLECTIONSTORE store; PWINE_COLLECTIONSTORE store;
@ -513,7 +512,7 @@ PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
list_init(&store->stores); list_init(&store->stores);
} }
} }
return (PWINECRYPT_CERTSTORE)store; return (WINECRYPT_CERTSTORE*)store;
} }
BOOL WINAPI CertAddStoreToCollection(HCERTSTORE hCollectionStore, BOOL WINAPI CertAddStoreToCollection(HCERTSTORE hCollectionStore,

View File

@ -256,30 +256,30 @@ typedef struct WINE_CRYPTCERTSTORE
CONTEXT_FUNCS ctls; CONTEXT_FUNCS ctls;
PFN_CERT_STORE_PROV_CONTROL control; /* optional */ PFN_CERT_STORE_PROV_CONTROL control; /* optional */
CONTEXT_PROPERTY_LIST *properties; CONTEXT_PROPERTY_LIST *properties;
} WINECRYPT_CERTSTORE, *PWINECRYPT_CERTSTORE; } WINECRYPT_CERTSTORE;
void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags, void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
CertStoreType type) DECLSPEC_HIDDEN; CertStoreType type) DECLSPEC_HIDDEN;
void CRYPT_FreeStore(PWINECRYPT_CERTSTORE store) DECLSPEC_HIDDEN; void CRYPT_FreeStore(WINECRYPT_CERTSTORE *store) DECLSPEC_HIDDEN;
BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0, BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0,
DWORD unk1) DECLSPEC_HIDDEN; DWORD unk1) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN; DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_ProvCreateStore(DWORD dwFlags,
PWINECRYPT_CERTSTORE memStore, const CERT_STORE_PROV_INFO *pProvInfo) DECLSPEC_HIDDEN; WINECRYPT_CERTSTORE *memStore, const CERT_STORE_PROV_INFO *pProvInfo) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider, WINECRYPT_CERTSTORE *CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider,
DWORD dwEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags, DWORD dwEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags,
const void *pvPara) DECLSPEC_HIDDEN; const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
const void *pvPara) DECLSPEC_HIDDEN; const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
const void *pvPara) DECLSPEC_HIDDEN; const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN; DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN; DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) DECLSPEC_HIDDEN; WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) DECLSPEC_HIDDEN;
/* Allocates and initializes a certificate chain engine, but without creating /* Allocates and initializes a certificate chain engine, but without creating
* the root store. Instead, it uses root, and assumes the caller has done any * the root store. Instead, it uses root, and assumes the caller has done any

View File

@ -36,7 +36,7 @@ BOOL WINAPI CertAddCTLContextToStore(HCERTSTORE hCertStore,
PCCTL_CONTEXT pCtlContext, DWORD dwAddDisposition, PCCTL_CONTEXT pCtlContext, DWORD dwAddDisposition,
PCCTL_CONTEXT* ppStoreContext) PCCTL_CONTEXT* ppStoreContext)
{ {
PWINECRYPT_CERTSTORE store = hCertStore; WINECRYPT_CERTSTORE *store = hCertStore;
BOOL ret = TRUE; BOOL ret = TRUE;
PCCTL_CONTEXT toAdd = NULL, existing = NULL; PCCTL_CONTEXT toAdd = NULL, existing = NULL;
@ -318,7 +318,7 @@ BOOL WINAPI CertDeleteCTLFromStore(PCCTL_CONTEXT pCtlContext)
ret = CertFreeCTLContext(pCtlContext); ret = CertFreeCTLContext(pCtlContext);
else else
{ {
PWINECRYPT_CERTSTORE hcs = pCtlContext->hCertStore; WINECRYPT_CERTSTORE *hcs = pCtlContext->hCertStore;
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC) if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
ret = FALSE; ret = FALSE;

View File

@ -212,10 +212,10 @@ static void *fileProvFuncs[] = {
CRYPT_FileControl, CRYPT_FileControl,
}; };
static PWINECRYPT_CERTSTORE CRYPT_CreateFileStore(DWORD dwFlags, static WINECRYPT_CERTSTORE *CRYPT_CreateFileStore(DWORD dwFlags,
HCERTSTORE memStore, HANDLE file, DWORD type) HCERTSTORE memStore, HANDLE file, DWORD type)
{ {
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
PWINE_FILESTOREINFO info = CryptMemAlloc(sizeof(WINE_FILESTOREINFO)); PWINE_FILESTOREINFO info = CryptMemAlloc(sizeof(WINE_FILESTOREINFO));
if (info) if (info)
@ -237,10 +237,10 @@ static PWINECRYPT_CERTSTORE CRYPT_CreateFileStore(DWORD dwFlags,
return store; return store;
} }
PWINECRYPT_CERTSTORE CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
const void *pvPara) const void *pvPara)
{ {
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
HANDLE file = (HANDLE)pvPara; HANDLE file = (HANDLE)pvPara;
TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara); TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara);
@ -287,7 +287,7 @@ PWINECRYPT_CERTSTORE CRYPT_FileOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
return store; return store;
} }
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
HCERTSTORE store = 0; HCERTSTORE store = 0;
@ -378,11 +378,11 @@ PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
return store; return store;
} }
PWINECRYPT_CERTSTORE CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv, WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
int len; int len;
PWINECRYPT_CERTSTORE ret = NULL; WINECRYPT_CERTSTORE *ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags, TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a(pvPara)); debugstr_a(pvPara));

View File

@ -29,7 +29,7 @@ typedef struct _WINE_PROVIDERSTORE
{ {
WINECRYPT_CERTSTORE hdr; WINECRYPT_CERTSTORE hdr;
DWORD dwStoreProvFlags; DWORD dwStoreProvFlags;
PWINECRYPT_CERTSTORE memStore; WINECRYPT_CERTSTORE *memStore;
HCERTSTOREPROV hStoreProv; HCERTSTOREPROV hStoreProv;
PFN_CERT_STORE_PROV_CLOSE provCloseStore; PFN_CERT_STORE_PROV_CLOSE provCloseStore;
PFN_CERT_STORE_PROV_WRITE_CERT provWriteCert; PFN_CERT_STORE_PROV_WRITE_CERT provWriteCert;
@ -51,10 +51,10 @@ static void WINAPI CRYPT_ProvCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
store->provCloseStore(store->hStoreProv, dwFlags); store->provCloseStore(store->hStoreProv, dwFlags);
if (!(store->dwStoreProvFlags & CERT_STORE_PROV_EXTERNAL_FLAG)) if (!(store->dwStoreProvFlags & CERT_STORE_PROV_EXTERNAL_FLAG))
CertCloseStore(store->memStore, dwFlags); CertCloseStore(store->memStore, dwFlags);
CRYPT_FreeStore((PWINECRYPT_CERTSTORE)store); CRYPT_FreeStore((WINECRYPT_CERTSTORE*)store);
} }
static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert, static BOOL CRYPT_ProvAddCert(WINECRYPT_CERTSTORE *store, void *cert,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
@ -83,7 +83,7 @@ static BOOL CRYPT_ProvAddCert(PWINECRYPT_CERTSTORE store, void *cert,
return ret; return ret;
} }
static void *CRYPT_ProvEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_ProvEnumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
void *ret; void *ret;
@ -99,7 +99,7 @@ static void *CRYPT_ProvEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_ProvDeleteCert(PWINECRYPT_CERTSTORE store, void *cert) static BOOL CRYPT_ProvDeleteCert(WINECRYPT_CERTSTORE *store, void *cert)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
BOOL ret = TRUE; BOOL ret = TRUE;
@ -113,7 +113,7 @@ static BOOL CRYPT_ProvDeleteCert(PWINECRYPT_CERTSTORE store, void *cert)
return ret; return ret;
} }
static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl, static BOOL CRYPT_ProvAddCRL(WINECRYPT_CERTSTORE *store, void *crl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
@ -150,7 +150,7 @@ static BOOL CRYPT_ProvAddCRL(PWINECRYPT_CERTSTORE store, void *crl,
return ret; return ret;
} }
static void *CRYPT_ProvEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_ProvEnumCRL(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
void *ret; void *ret;
@ -166,7 +166,7 @@ static void *CRYPT_ProvEnumCRL(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_ProvDeleteCRL(PWINECRYPT_CERTSTORE store, void *crl) static BOOL CRYPT_ProvDeleteCRL(WINECRYPT_CERTSTORE *store, void *crl)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
BOOL ret = TRUE; BOOL ret = TRUE;
@ -180,7 +180,7 @@ static BOOL CRYPT_ProvDeleteCRL(PWINECRYPT_CERTSTORE store, void *crl)
return ret; return ret;
} }
static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl, static BOOL CRYPT_ProvAddCTL(WINECRYPT_CERTSTORE *store, void *ctl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
@ -217,7 +217,7 @@ static BOOL CRYPT_ProvAddCTL(PWINECRYPT_CERTSTORE store, void *ctl,
return ret; return ret;
} }
static void *CRYPT_ProvEnumCTL(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_ProvEnumCTL(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
void *ret; void *ret;
@ -233,7 +233,7 @@ static void *CRYPT_ProvEnumCTL(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_ProvDeleteCTL(PWINECRYPT_CERTSTORE store, void *ctl) static BOOL CRYPT_ProvDeleteCTL(WINECRYPT_CERTSTORE *store, void *ctl)
{ {
PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store; PWINE_PROVIDERSTORE ps = (PWINE_PROVIDERSTORE)store;
BOOL ret = TRUE; BOOL ret = TRUE;
@ -262,8 +262,8 @@ static BOOL WINAPI CRYPT_ProvControl(HCERTSTORE hCertStore, DWORD dwFlags,
return ret; return ret;
} }
PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_ProvCreateStore(DWORD dwFlags,
PWINECRYPT_CERTSTORE memStore, const CERT_STORE_PROV_INFO *pProvInfo) WINECRYPT_CERTSTORE *memStore, const CERT_STORE_PROV_INFO *pProvInfo)
{ {
PWINE_PROVIDERSTORE ret = CryptMemAlloc(sizeof(WINE_PROVIDERSTORE)); PWINE_PROVIDERSTORE ret = CryptMemAlloc(sizeof(WINE_PROVIDERSTORE));
@ -338,16 +338,16 @@ PWINECRYPT_CERTSTORE CRYPT_ProvCreateStore(DWORD dwFlags,
else else
ret->provControl = NULL; ret->provControl = NULL;
} }
return (PWINECRYPT_CERTSTORE)ret; return (WINECRYPT_CERTSTORE*)ret;
} }
PWINECRYPT_CERTSTORE CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider, WINECRYPT_CERTSTORE *CRYPT_ProvOpenStore(LPCSTR lpszStoreProvider,
DWORD dwEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) DWORD dwEncodingType, HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara)
{ {
static HCRYPTOIDFUNCSET set = NULL; static HCRYPTOIDFUNCSET set = NULL;
PFN_CERT_DLL_OPEN_STORE_PROV_FUNC provOpenFunc; PFN_CERT_DLL_OPEN_STORE_PROV_FUNC provOpenFunc;
HCRYPTOIDFUNCADDR hFunc; HCRYPTOIDFUNCADDR hFunc;
PWINECRYPT_CERTSTORE ret = NULL; WINECRYPT_CERTSTORE *ret = NULL;
if (!set) if (!set)
set = CryptInitOIDFunctionSet(CRYPT_OID_OPEN_STORE_PROV_FUNC, 0); set = CryptInitOIDFunctionSet(CRYPT_OID_OPEN_STORE_PROV_FUNC, 0);

View File

@ -507,10 +507,10 @@ static void *regProvFuncs[] = {
CRYPT_RegControl, CRYPT_RegControl,
}; };
PWINECRYPT_CERTSTORE CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
const void *pvPara) const void *pvPara)
{ {
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara); TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara);
@ -535,7 +535,7 @@ PWINECRYPT_CERTSTORE CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
dwFlags & CERT_STORE_READONLY_FLAG ? KEY_READ : KEY_ALL_ACCESS, dwFlags & CERT_STORE_READONLY_FLAG ? KEY_READ : KEY_ALL_ACCESS,
TRUE, 0)) TRUE, 0))
{ {
PWINECRYPT_CERTSTORE memStore; WINECRYPT_CERTSTORE *memStore;
memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv, memStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, hCryptProv,
CERT_STORE_CREATE_NEW_FLAG, NULL); CERT_STORE_CREATE_NEW_FLAG, NULL);

View File

@ -811,9 +811,9 @@ static HCERTSTORE create_root_store(void)
return root; return root;
} }
static PWINECRYPT_CERTSTORE CRYPT_rootStore; static WINECRYPT_CERTSTORE *CRYPT_rootStore;
PWINECRYPT_CERTSTORE CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags)
{ {
TRACE("(%ld, %08x)\n", hCryptProv, dwFlags); TRACE("(%ld, %08x)\n", hCryptProv, dwFlags);

View File

@ -104,7 +104,7 @@ void CRYPT_InitStore(WINECRYPT_CERTSTORE *store, DWORD dwFlags,
store->properties = NULL; store->properties = NULL;
} }
void CRYPT_FreeStore(PWINECRYPT_CERTSTORE store) void CRYPT_FreeStore(WINECRYPT_CERTSTORE *store)
{ {
if (store->properties) if (store->properties)
ContextPropertyList_Free(store->properties); ContextPropertyList_Free(store->properties);
@ -148,7 +148,7 @@ BOOL WINAPI I_CertUpdateStore(HCERTSTORE store1, HCERTSTORE store2, DWORD unk0,
return TRUE; return TRUE;
} }
static BOOL CRYPT_MemAddCert(PWINECRYPT_CERTSTORE store, void *cert, static BOOL CRYPT_MemAddCert(WINECRYPT_CERTSTORE *store, void *cert,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
@ -166,7 +166,7 @@ static BOOL CRYPT_MemAddCert(PWINECRYPT_CERTSTORE store, void *cert,
return context != 0; return context != 0;
} }
static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_MemEnumCert(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
void *ret; void *ret;
@ -181,7 +181,7 @@ static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_MemDeleteCert(PWINECRYPT_CERTSTORE store, void *pCertContext) static BOOL CRYPT_MemDeleteCert(WINECRYPT_CERTSTORE *store, void *pCertContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
BOOL ret; BOOL ret;
@ -193,7 +193,7 @@ static BOOL CRYPT_MemDeleteCert(PWINECRYPT_CERTSTORE store, void *pCertContext)
return ret; return ret;
} }
static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl, static BOOL CRYPT_MemAddCrl(WINECRYPT_CERTSTORE *store, void *crl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
@ -211,7 +211,7 @@ static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl,
return context != 0; return context != 0;
} }
static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_MemEnumCrl(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
void *ret; void *ret;
@ -226,7 +226,7 @@ static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext) static BOOL CRYPT_MemDeleteCrl(WINECRYPT_CERTSTORE *store, void *pCrlContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
BOOL ret; BOOL ret;
@ -238,7 +238,7 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext)
return ret; return ret;
} }
static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl, static BOOL CRYPT_MemAddCtl(WINECRYPT_CERTSTORE *store, void *ctl,
void *toReplace, const void **ppStoreContext) void *toReplace, const void **ppStoreContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
@ -256,7 +256,7 @@ static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl,
return context != 0; return context != 0;
} }
static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev) static void *CRYPT_MemEnumCtl(WINECRYPT_CERTSTORE *store, void *pPrev)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
void *ret; void *ret;
@ -271,7 +271,7 @@ static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev)
return ret; return ret;
} }
static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext) static BOOL CRYPT_MemDeleteCtl(WINECRYPT_CERTSTORE *store, void *pCtlContext)
{ {
WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store;
BOOL ret; BOOL ret;
@ -301,7 +301,7 @@ static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
ContextList_Free(store->certs); ContextList_Free(store->certs);
ContextList_Free(store->crls); ContextList_Free(store->crls);
ContextList_Free(store->ctls); ContextList_Free(store->ctls);
CRYPT_FreeStore((PWINECRYPT_CERTSTORE)store); CRYPT_FreeStore((WINECRYPT_CERTSTORE*)store);
} }
static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
@ -345,18 +345,18 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
CryptReleaseContext(hCryptProv, 0); CryptReleaseContext(hCryptProv, 0);
} }
} }
return (PWINECRYPT_CERTSTORE)store; return (WINECRYPT_CERTSTORE*)store;
} }
static const WCHAR rootW[] = { 'R','o','o','t',0 }; static const WCHAR rootW[] = { 'R','o','o','t',0 };
static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
static const WCHAR fmt[] = { '%','s','\\','%','s',0 }; static const WCHAR fmt[] = { '%','s','\\','%','s',0 };
LPCWSTR storeName = pvPara; LPCWSTR storeName = pvPara;
LPWSTR storePath; LPWSTR storePath;
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
HKEY root; HKEY root;
LPCWSTR base; LPCWSTR base;
@ -462,11 +462,11 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreW(HCRYPTPROV hCryptProv,
return store; return store;
} }
static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
int len; int len;
PWINECRYPT_CERTSTORE ret = NULL; WINECRYPT_CERTSTORE *ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags, TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a(pvPara)); debugstr_a(pvPara));
@ -491,7 +491,7 @@ static PWINECRYPT_CERTSTORE CRYPT_SysRegOpenStoreA(HCRYPTPROV hCryptProv,
return ret; return ret;
} }
static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
HCERTSTORE store = 0; HCERTSTORE store = 0;
@ -563,11 +563,11 @@ static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreW(HCRYPTPROV hCryptProv,
return store; return store;
} }
static PWINECRYPT_CERTSTORE CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_SysOpenStoreA(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
int len; int len;
PWINECRYPT_CERTSTORE ret = NULL; WINECRYPT_CERTSTORE *ret = NULL;
TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags, TRACE("(%ld, %08x, %s)\n", hCryptProv, dwFlags,
debugstr_a(pvPara)); debugstr_a(pvPara));
@ -604,12 +604,12 @@ static void *msgProvFuncs[] = {
CRYPT_MsgCloseStore, CRYPT_MsgCloseStore,
}; };
static PWINECRYPT_CERTSTORE CRYPT_MsgOpenStore(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_MsgOpenStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
HCRYPTMSG msg = (HCRYPTMSG)pvPara; HCRYPTMSG msg = (HCRYPTMSG)pvPara;
PWINECRYPT_CERTSTORE memStore; WINECRYPT_CERTSTORE *memStore;
TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara); TRACE("(%ld, %08x, %p)\n", hCryptProv, dwFlags, pvPara);
@ -683,11 +683,11 @@ static PWINECRYPT_CERTSTORE CRYPT_MsgOpenStore(HCRYPTPROV hCryptProv,
return store; return store;
} }
static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
HCRYPTMSG msg; HCRYPTMSG msg;
PWINECRYPT_CERTSTORE store = NULL; WINECRYPT_CERTSTORE *store = NULL;
const CRYPT_DATA_BLOB *data = pvPara; const CRYPT_DATA_BLOB *data = pvPara;
BOOL ret; BOOL ret;
DWORD msgOpenFlags = dwFlags & CERT_STORE_NO_CRYPT_RELEASE_FLAG ? 0 : DWORD msgOpenFlags = dwFlags & CERT_STORE_NO_CRYPT_RELEASE_FLAG ? 0 :
@ -724,7 +724,7 @@ static PWINECRYPT_CERTSTORE CRYPT_PKCSOpenStore(HCRYPTPROV hCryptProv,
return store; return store;
} }
static PWINECRYPT_CERTSTORE CRYPT_SerializedOpenStore(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_SerializedOpenStore(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
HCERTSTORE store; HCERTSTORE store;
@ -749,10 +749,10 @@ static PWINECRYPT_CERTSTORE CRYPT_SerializedOpenStore(HCRYPTPROV hCryptProv,
} }
} }
TRACE("returning %p\n", store); TRACE("returning %p\n", store);
return (PWINECRYPT_CERTSTORE)store; return (WINECRYPT_CERTSTORE*)store;
} }
static PWINECRYPT_CERTSTORE CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv, static WINECRYPT_CERTSTORE *CRYPT_PhysOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DWORD dwFlags, const void *pvPara)
{ {
if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG) if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG)
@ -883,7 +883,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition, PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition,
PCCERT_CONTEXT *ppStoreContext) PCCERT_CONTEXT *ppStoreContext)
{ {
PWINECRYPT_CERTSTORE store = hCertStore; WINECRYPT_CERTSTORE *store = hCertStore;
BOOL ret = TRUE; BOOL ret = TRUE;
PCCERT_CONTEXT toAdd = NULL, existing = NULL; PCCERT_CONTEXT toAdd = NULL, existing = NULL;
@ -1035,7 +1035,7 @@ BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
ret = CertFreeCertificateContext(pCertContext); ret = CertFreeCertificateContext(pCertContext);
else else
{ {
PWINECRYPT_CERTSTORE hcs = pCertContext->hCertStore; WINECRYPT_CERTSTORE *hcs = pCertContext->hCertStore;
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC) if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
ret = FALSE; ret = FALSE;
@ -1054,7 +1054,7 @@ BOOL WINAPI CertAddCRLContextToStore(HCERTSTORE hCertStore,
PCCRL_CONTEXT pCrlContext, DWORD dwAddDisposition, PCCRL_CONTEXT pCrlContext, DWORD dwAddDisposition,
PCCRL_CONTEXT* ppStoreContext) PCCRL_CONTEXT* ppStoreContext)
{ {
PWINECRYPT_CERTSTORE store = hCertStore; WINECRYPT_CERTSTORE *store = hCertStore;
BOOL ret = TRUE; BOOL ret = TRUE;
PCCRL_CONTEXT toAdd = NULL, existing = NULL; PCCRL_CONTEXT toAdd = NULL, existing = NULL;
@ -1177,7 +1177,7 @@ BOOL WINAPI CertDeleteCRLFromStore(PCCRL_CONTEXT pCrlContext)
ret = CertFreeCRLContext(pCrlContext); ret = CertFreeCRLContext(pCrlContext);
else else
{ {
PWINECRYPT_CERTSTORE hcs = pCrlContext->hCertStore; WINECRYPT_CERTSTORE *hcs = pCrlContext->hCertStore;
if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC) if (hcs->dwMagic != WINE_CRYPTCERTSTORE_MAGIC)
ret = FALSE; ret = FALSE;
@ -1267,7 +1267,7 @@ BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags,
BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId, BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
void *pvData, DWORD *pcbData) void *pvData, DWORD *pcbData)
{ {
PWINECRYPT_CERTSTORE store = hCertStore; WINECRYPT_CERTSTORE *store = hCertStore;
BOOL ret = FALSE; BOOL ret = FALSE;
TRACE("(%p, %d, %p, %p)\n", hCertStore, dwPropId, pvData, pcbData); TRACE("(%p, %d, %p, %p)\n", hCertStore, dwPropId, pvData, pcbData);
@ -1331,7 +1331,7 @@ BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId, BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId,
DWORD dwFlags, const void *pvData) DWORD dwFlags, const void *pvData)
{ {
PWINECRYPT_CERTSTORE store = hCertStore; WINECRYPT_CERTSTORE *store = hCertStore;
BOOL ret = FALSE; BOOL ret = FALSE;
TRACE("(%p, %d, %08x, %p)\n", hCertStore, dwPropId, dwFlags, pvData); TRACE("(%p, %d, %08x, %p)\n", hCertStore, dwPropId, dwFlags, pvData);