crypt32: Rename a confusing type.
This commit is contained in:
parent
c78b8a17fd
commit
f68036cebd
|
@ -107,12 +107,12 @@ typedef BOOL (*AddFunc)(struct WINE_CRYPTCERTSTORE *store, void *context,
|
||||||
|
|
||||||
typedef BOOL (*DeleteFunc)(struct WINE_CRYPTCERTSTORE *store, void *context);
|
typedef BOOL (*DeleteFunc)(struct WINE_CRYPTCERTSTORE *store, void *context);
|
||||||
|
|
||||||
typedef struct _CONTEXT_STORE
|
typedef struct _CONTEXT_FUNCS
|
||||||
{
|
{
|
||||||
AddFunc addContext;
|
AddFunc addContext;
|
||||||
EnumFunc enumContext;
|
EnumFunc enumContext;
|
||||||
DeleteFunc deleteContext;
|
DeleteFunc deleteContext;
|
||||||
} CONTEXT_STORE, *PCONTEXT_STORE;
|
} CONTEXT_FUNCS, *PCONTEXT_FUNCS;
|
||||||
|
|
||||||
typedef enum _CertStoreType {
|
typedef enum _CertStoreType {
|
||||||
StoreTypeMem,
|
StoreTypeMem,
|
||||||
|
@ -135,8 +135,8 @@ typedef struct WINE_CRYPTCERTSTORE
|
||||||
HCRYPTPROV cryptProv;
|
HCRYPTPROV cryptProv;
|
||||||
CertStoreType type;
|
CertStoreType type;
|
||||||
PFN_CERT_STORE_PROV_CLOSE closeStore;
|
PFN_CERT_STORE_PROV_CLOSE closeStore;
|
||||||
CONTEXT_STORE certs;
|
CONTEXT_FUNCS certs;
|
||||||
CONTEXT_STORE crls;
|
CONTEXT_FUNCS crls;
|
||||||
PFN_CERT_STORE_PROV_CONTROL control; /* optional */
|
PFN_CERT_STORE_PROV_CONTROL control; /* optional */
|
||||||
PCONTEXT_PROPERTY_LIST properties;
|
PCONTEXT_PROPERTY_LIST properties;
|
||||||
} WINECRYPT_CERTSTORE, *PWINECRYPT_CERTSTORE;
|
} WINECRYPT_CERTSTORE, *PWINECRYPT_CERTSTORE;
|
||||||
|
@ -406,28 +406,28 @@ static void *CRYPT_CollectionCreateContextFromChild(PWINE_COLLECTIONSTORE store,
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
|
static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
|
||||||
unsigned int contextStoreOffset, void *context, void *toReplace, unsigned int contextSize,
|
unsigned int contextFuncsOffset, void *context, void *toReplace, unsigned int contextSize,
|
||||||
void **pChildContext)
|
void **pChildContext)
|
||||||
{
|
{
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
void *childContext = NULL;
|
void *childContext = NULL;
|
||||||
PWINE_STORE_LIST_ENTRY storeEntry = NULL;
|
PWINE_STORE_LIST_ENTRY storeEntry = NULL;
|
||||||
|
|
||||||
TRACE("(%p, %d, %p, %p, %d)\n", store, contextStoreOffset, context,
|
TRACE("(%p, %d, %p, %p, %d)\n", store, contextFuncsOffset, context,
|
||||||
toReplace, contextSize);
|
toReplace, contextSize);
|
||||||
|
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
if (toReplace)
|
if (toReplace)
|
||||||
{
|
{
|
||||||
void *existingLinked = Context_GetLinkedContext(toReplace, contextSize);
|
void *existingLinked = Context_GetLinkedContext(toReplace, contextSize);
|
||||||
PCONTEXT_STORE contextStore;
|
PCONTEXT_FUNCS contextFuncs;
|
||||||
|
|
||||||
storeEntry = *(PWINE_STORE_LIST_ENTRY *)Context_GetExtra(toReplace,
|
storeEntry = *(PWINE_STORE_LIST_ENTRY *)Context_GetExtra(toReplace,
|
||||||
contextSize);
|
contextSize);
|
||||||
contextStore = (PCONTEXT_STORE)((LPBYTE)storeEntry->store +
|
contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store +
|
||||||
contextStoreOffset);
|
contextFuncsOffset);
|
||||||
ret = contextStore->addContext(storeEntry->store, context,
|
ret = contextFuncs->addContext(storeEntry->store, context,
|
||||||
existingLinked, (const void **)&childContext);
|
existingLinked, childContext);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -439,11 +439,11 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
|
||||||
{
|
{
|
||||||
if (entry->dwUpdateFlags & CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG)
|
if (entry->dwUpdateFlags & CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG)
|
||||||
{
|
{
|
||||||
PCONTEXT_STORE contextStore = (PCONTEXT_STORE)(
|
PCONTEXT_FUNCS contextFuncs = (PCONTEXT_FUNCS)(
|
||||||
(LPBYTE)entry->store + contextStoreOffset);
|
(LPBYTE)entry->store + contextFuncsOffset);
|
||||||
|
|
||||||
storeEntry = entry;
|
storeEntry = entry;
|
||||||
ret = contextStore->addContext(entry->store, context, NULL,
|
ret = contextFuncs->addContext(entry->store, context, NULL,
|
||||||
(const void **)&childContext);
|
(const void **)&childContext);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -466,13 +466,13 @@ static BOOL CRYPT_CollectionAddContext(PWINE_COLLECTIONSTORE store,
|
||||||
* Assumes the collection store's lock is held.
|
* Assumes the collection store's lock is held.
|
||||||
*/
|
*/
|
||||||
static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
|
static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
|
||||||
PWINE_STORE_LIST_ENTRY storeEntry, size_t contextStoreOffset,
|
PWINE_STORE_LIST_ENTRY storeEntry, size_t contextFuncsOffset,
|
||||||
PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize)
|
PCWINE_CONTEXT_INTERFACE contextInterface, void *pPrev, size_t contextSize)
|
||||||
{
|
{
|
||||||
void *ret, *child;
|
void *ret, *child;
|
||||||
struct list *storeNext = list_next(&store->stores, &storeEntry->entry);
|
struct list *storeNext = list_next(&store->stores, &storeEntry->entry);
|
||||||
PCONTEXT_STORE contextStore = (PCONTEXT_STORE)((LPBYTE)storeEntry->store +
|
PCONTEXT_FUNCS contextFuncs = (PCONTEXT_FUNCS)((LPBYTE)storeEntry->store +
|
||||||
contextStoreOffset);
|
contextFuncsOffset);
|
||||||
|
|
||||||
TRACE("(%p, %p, %p)\n", store, storeEntry, pPrev);
|
TRACE("(%p, %p, %p)\n", store, storeEntry, pPrev);
|
||||||
|
|
||||||
|
@ -483,12 +483,12 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
|
||||||
*/
|
*/
|
||||||
child = Context_GetLinkedContext(pPrev, contextSize);
|
child = Context_GetLinkedContext(pPrev, contextSize);
|
||||||
contextInterface->duplicate(child);
|
contextInterface->duplicate(child);
|
||||||
child = contextStore->enumContext(storeEntry->store, child);
|
child = contextFuncs->enumContext(storeEntry->store, child);
|
||||||
contextInterface->free(pPrev);
|
contextInterface->free(pPrev);
|
||||||
pPrev = NULL;
|
pPrev = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
child = contextStore->enumContext(storeEntry->store, NULL);
|
child = contextFuncs->enumContext(storeEntry->store, NULL);
|
||||||
if (child)
|
if (child)
|
||||||
ret = CRYPT_CollectionCreateContextFromChild(store, storeEntry, child,
|
ret = CRYPT_CollectionCreateContextFromChild(store, storeEntry, child,
|
||||||
contextSize, FALSE);
|
contextSize, FALSE);
|
||||||
|
@ -496,7 +496,7 @@ static void *CRYPT_CollectionAdvanceEnum(PWINE_COLLECTIONSTORE store,
|
||||||
{
|
{
|
||||||
if (storeNext)
|
if (storeNext)
|
||||||
ret = CRYPT_CollectionAdvanceEnum(store, LIST_ENTRY(storeNext,
|
ret = CRYPT_CollectionAdvanceEnum(store, LIST_ENTRY(storeNext,
|
||||||
WINE_STORE_LIST_ENTRY, entry), contextStoreOffset,
|
WINE_STORE_LIST_ENTRY, entry), contextFuncsOffset,
|
||||||
contextInterface, NULL, contextSize);
|
contextInterface, NULL, contextSize);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue