crypt32: Get rid of no longer needed fields in ContextList.

oldstable
Jacek Caban 2013-10-17 11:08:35 +02:00 committed by Alexandre Julliard
parent 619bbe5d29
commit 6b6ad98277
3 changed files with 5 additions and 14 deletions

View File

@ -112,21 +112,16 @@ void Context_CopyProperties(const void *to, const void *from)
struct ContextList
{
const WINE_CONTEXT_INTERFACE *contextInterface;
size_t contextSize;
CRITICAL_SECTION cs;
struct list contexts;
};
struct ContextList *ContextList_Create(
const WINE_CONTEXT_INTERFACE *contextInterface, size_t contextSize)
struct ContextList *ContextList_Create(void)
{
struct ContextList *list = CryptMemAlloc(sizeof(struct ContextList));
if (list)
{
list->contextInterface = contextInterface;
list->contextSize = contextSize;
InitializeCriticalSection(&list->cs);
list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ContextList.cs");
list_init(&list->contexts);

View File

@ -438,8 +438,7 @@ void ContextPropertyList_Free(CONTEXT_PROPERTY_LIST *list) DECLSPEC_HIDDEN;
*/
struct ContextList;
struct ContextList *ContextList_Create(
const WINE_CONTEXT_INTERFACE *contextInterface, size_t contextSize) DECLSPEC_HIDDEN;
struct ContextList *ContextList_Create(void) DECLSPEC_HIDDEN;
context_t *ContextList_Add(struct ContextList *list, context_t *toLink, context_t *toReplace,
struct WINE_CRYPTCERTSTORE *store, BOOL use_link) DECLSPEC_HIDDEN;

View File

@ -345,12 +345,9 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
{
memset(store, 0, sizeof(WINE_MEMSTORE));
CRYPT_InitStore(&store->hdr, dwFlags, StoreTypeMem, &MemStoreVtbl);
store->certs = ContextList_Create(pCertInterface,
sizeof(CERT_CONTEXT));
store->crls = ContextList_Create(pCRLInterface,
sizeof(CRL_CONTEXT));
store->ctls = ContextList_Create(pCTLInterface,
sizeof(CTL_CONTEXT));
store->certs = ContextList_Create();
store->crls = ContextList_Create();
store->ctls = ContextList_Create();
/* Mem store doesn't need crypto provider, so close it */
if (hCryptProv && !(dwFlags & CERT_STORE_NO_CRYPT_RELEASE_FLAG))
CryptReleaseContext(hCryptProv, 0);