winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
October 2013
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
757 discussions
Start a n
N
ew thread
Jacek Caban : crypt32: Get rid of no longer needed fields in ContextList.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 6b6ad98277e809c3420df818a210a37e900d2428 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6b6ad98277e809c3420df818a…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:08:35 2013 +0200 crypt32: Get rid of no longer needed fields in ContextList. --- dlls/crypt32/context.c | 7 +------ dlls/crypt32/crypt32_private.h | 3 +-- dlls/crypt32/store.c | 9 +++------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 65a906b..4704154 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -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); diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index f02a333..d9f2400 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -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; diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 902b02c..7fc6acd 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -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);
1
0
0
0
Jacek Caban : crypt32: Get rid of no longer needed BASE_CONTEXT.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 619bbe5d29efe925ce39307a94c32ec9a022d989 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=619bbe5d29efe925ce39307a9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:08:25 2013 +0200 crypt32: Get rid of no longer needed BASE_CONTEXT. --- dlls/crypt32/context.c | 9 +++------ dlls/crypt32/crypt32_private.h | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 9108ada..65a906b 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -25,14 +25,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(context); -#define CONTEXT_FROM_BASE_CONTEXT(p) (void*)(p+1) -#define BASE_CONTEXT_FROM_CONTEXT(p) ((BASE_CONTEXT*)(p)-1) - void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl) { - BASE_CONTEXT *context; + context_t *context; - context = CryptMemAlloc(contextSize + sizeof(BASE_CONTEXT)); + context = CryptMemAlloc(sizeof(context_t) + contextSize); if (!context) return NULL; @@ -47,7 +44,7 @@ void *Context_CreateDataContext(size_t contextSize, const context_vtbl_t *vtbl) } TRACE("returning %p\n", context); - return CONTEXT_FROM_BASE_CONTEXT(context); + return context_ptr(context); } context_t *Context_CreateLinkContext(unsigned int contextSize, context_t *linked) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 3ccd279..f02a333 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -171,7 +171,7 @@ typedef struct { struct _context_t *(*clone)(context_t*,struct WINE_CRYPTCERTSTORE*,BOOL); } context_vtbl_t; -typedef struct _context_t { +struct _context_t { const context_vtbl_t *vtbl; LONG ref; struct _context_t *linked; @@ -180,7 +180,7 @@ typedef struct _context_t { struct list entry; void *ptr; } u; -} BASE_CONTEXT; +}; static inline context_t *context_from_ptr(const void *ptr) {
1
0
0
0
Jacek Caban : crypt32: Use context_t in addContext.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 83026a71430bbc82239cc22ee99e1f812969caea URL:
http://source.winehq.org/git/wine.git/?a=commit;h=83026a71430bbc82239cc22ee…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:08:15 2013 +0200 crypt32: Use context_t in addContext. --- dlls/crypt32/cert.c | 18 ++++++----- dlls/crypt32/collectionstore.c | 63 ++++++++++++++++++++------------------- dlls/crypt32/crypt32_private.h | 2 +- dlls/crypt32/ctl.c | 13 ++++++-- dlls/crypt32/provstore.c | 25 +++++++-------- dlls/crypt32/store.c | 44 ++++++++++++++++------------ 6 files changed, 89 insertions(+), 76 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=83026a71430bbc82239cc…
1
0
0
0
Jacek Caban : crypt32: Use context_t in enumContext.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: c75af2b9e06b193e7cf5f5f75e47e78224a78028 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c75af2b9e06b193e7cf5f5f75…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:07:55 2013 +0200 crypt32: Use context_t in enumContext. --- dlls/crypt32/collectionstore.c | 79 +++++++++++++++++++--------------------- dlls/crypt32/context.c | 14 ++++---- dlls/crypt32/crypt32_private.h | 7 +--- dlls/crypt32/ctl.c | 9 ++--- dlls/crypt32/provstore.c | 66 +++++++++++++++++----------------- dlls/crypt32/store.c | 46 +++++++++++------------ 6 files changed, 106 insertions(+), 115 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c75af2b9e06b193e7cf5f…
1
0
0
0
Jacek Caban : crypt32: Use context_t in ContextList_Add.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 8d4b288f590f8d1acb241d166e7da015a7fbd37b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8d4b288f590f8d1acb241d166…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:07:38 2013 +0200 crypt32: Use context_t in ContextList_Add. --- dlls/crypt32/context.c | 14 ++++++-------- dlls/crypt32/crypt32_private.h | 2 +- dlls/crypt32/store.c | 30 ++++++++++++++++++------------ 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 0dbf934..3b34463 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -137,33 +137,31 @@ struct ContextList *ContextList_Create( return list; } -void *ContextList_Add(struct ContextList *list, void *toLink, void *toReplace, struct WINE_CRYPTCERTSTORE *store, BOOL use_link) +context_t *ContextList_Add(struct ContextList *list, context_t *toLink, context_t *existing, struct WINE_CRYPTCERTSTORE *store, BOOL use_link) { context_t *context; - TRACE("(%p, %p, %p)\n", list, toLink, toReplace); + TRACE("(%p, %p, %p)\n", list, toLink, existing); - context = context_from_ptr(toLink)->vtbl->clone(BASE_CONTEXT_FROM_CONTEXT(toLink), store, use_link); + context = toLink->vtbl->clone(toLink, store, use_link); if (context) { TRACE("adding %p\n", context); EnterCriticalSection(&list->cs); - if (toReplace) + if (existing) { - context_t *existing = context_from_ptr(toReplace); - context->u.entry.prev = existing->u.entry.prev; context->u.entry.next = existing->u.entry.next; context->u.entry.prev->next = &context->u.entry; context->u.entry.next->prev = &context->u.entry; list_init(&existing->u.entry); - Context_Release(context_from_ptr(toReplace)); + Context_Release(existing); } else list_add_head(&list->contexts, &context->u.entry); LeaveCriticalSection(&list->cs); } - return CONTEXT_FROM_BASE_CONTEXT(context); + return context; } void *ContextList_Enum(struct ContextList *list, void *pPrev) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index 1c8eae8..1d7b287 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -444,7 +444,7 @@ struct ContextList; struct ContextList *ContextList_Create( const WINE_CONTEXT_INTERFACE *contextInterface, size_t contextSize) DECLSPEC_HIDDEN; -void *ContextList_Add(struct ContextList *list, void *toLink, void *toReplace, +context_t *ContextList_Add(struct ContextList *list, context_t *toLink, context_t *toReplace, struct WINE_CRYPTCERTSTORE *store, BOOL use_link) DECLSPEC_HIDDEN; void *ContextList_Enum(struct ContextList *list, void *pPrev) DECLSPEC_HIDDEN; diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 08c2a30..3381194 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -146,16 +146,18 @@ static BOOL MemStore_addCert(WINECRYPT_CERTSTORE *store, void *cert, void *toReplace, const void **ppStoreContext, BOOL use_link) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; - PCERT_CONTEXT context; + context_t *context; TRACE("(%p, %p, %p, %p)\n", store, cert, toReplace, ppStoreContext); - context = ContextList_Add(ms->certs, cert, toReplace, store, use_link); + context = ContextList_Add(ms->certs, context_from_ptr(cert), toReplace ? context_from_ptr(toReplace) : NULL, store, use_link); if (!context) return FALSE; - if (ppStoreContext) - *ppStoreContext = CertDuplicateCertificateContext(context); + if (ppStoreContext) { + Context_AddRef(context); + *ppStoreContext = context_ptr(context); + } return TRUE; } @@ -188,16 +190,18 @@ static BOOL MemStore_addCRL(WINECRYPT_CERTSTORE *store, void *crl, void *toReplace, const void **ppStoreContext, BOOL use_link) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; - PCRL_CONTEXT context; + context_t *context; TRACE("(%p, %p, %p, %p)\n", store, crl, toReplace, ppStoreContext); - context = ContextList_Add(ms->crls, crl, toReplace, store, use_link); + context = ContextList_Add(ms->crls, context_from_ptr(crl), toReplace ? context_from_ptr(toReplace) : NULL, store, use_link); if (!context) return FALSE; - if (ppStoreContext) - *ppStoreContext = CertDuplicateCRLContext(context); + if (ppStoreContext) { + Context_AddRef(context); + *ppStoreContext = context_ptr(context); + } return TRUE; } @@ -230,16 +234,18 @@ static BOOL MemStore_addCTL(WINECRYPT_CERTSTORE *store, void *ctl, void *toReplace, const void **ppStoreContext, BOOL use_link) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; - PCTL_CONTEXT context; + context_t *context; TRACE("(%p, %p, %p, %p)\n", store, ctl, toReplace, ppStoreContext); - context = ContextList_Add(ms->ctls, ctl, toReplace, store, use_link); + context = ContextList_Add(ms->ctls, context_from_ptr(ctl), toReplace ? context_from_ptr(toReplace) : NULL, store, use_link); if (!context) return FALSE; - if (ppStoreContext) - *ppStoreContext = CertDuplicateCTLContext(context); + if (ppStoreContext) { + Context_AddRef(context); + *ppStoreContext = context_ptr(context); + } return TRUE; }
1
0
0
0
Jacek Caban : crypt32: Store properties directly in link contexts and get rid of Context_GetProperties .
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 6eddbf18cad2bacab15c52dcf70d33443536d2be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6eddbf18cad2bacab15c52dcf…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:07:24 2013 +0200 crypt32: Store properties directly in link contexts and get rid of Context_GetProperties. --- dlls/crypt32/cert.c | 98 +++++++++++++++++++-------------------- dlls/crypt32/context.c | 15 +----- dlls/crypt32/crl.c | 50 ++++++++------------ dlls/crypt32/crypt32_private.h | 5 -- dlls/crypt32/ctl.c | 46 +++++++++---------- 5 files changed, 93 insertions(+), 121 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6eddbf18cad2bacab15c5…
1
0
0
0
Jacek Caban : crypt32: Get rid of no longer used functions.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 275ac93e8db02d309f46d58af834bb5590481f0f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=275ac93e8db02d309f46d58af…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:07:08 2013 +0200 crypt32: Get rid of no longer used functions. --- dlls/crypt32/context.c | 16 ---------------- 1 files changed, 0 insertions(+), 16 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 65e9fab..02ec40d 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -76,22 +76,6 @@ void Context_AddRef(context_t *context) TRACE("(%p) ref=%d\n", context, context->ref); } -void *Context_GetExtra(const void *context, size_t contextSize) -{ - BASE_CONTEXT *baseContext = BASE_CONTEXT_FROM_CONTEXT(context); - - assert(baseContext->linked != NULL); - return (LPBYTE)CONTEXT_FROM_BASE_CONTEXT(baseContext) + contextSize; -} - -void *Context_GetLinkedContext(void *context) -{ - BASE_CONTEXT *baseContext = BASE_CONTEXT_FROM_CONTEXT(context); - - assert(baseContext->linked != NULL); - return CONTEXT_FROM_BASE_CONTEXT(baseContext->linked); -} - CONTEXT_PROPERTY_LIST *Context_GetProperties(const void *context) { BASE_CONTEXT *ptr = BASE_CONTEXT_FROM_CONTEXT(context);
1
0
0
0
Jacek Caban : crypt32: Added more cert duplicate and link tests.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: e7eeef49ff884e41178f4c2a969dfedb2608cce0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7eeef49ff884e41178f4c2a9…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:06:59 2013 +0200 crypt32: Added more cert duplicate and link tests. --- dlls/crypt32/tests/cert.c | 77 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 75 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index dfb6921..a96a75f 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -680,8 +680,8 @@ static void testCreateCert(void) static void testDupCert(void) { - HCERTSTORE store; - PCCERT_CONTEXT context, dupContext; + PCCERT_CONTEXT context, dupContext, storeContext, storeContext2, context2; + HCERTSTORE store, store2; BOOL ret; store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, @@ -719,11 +719,83 @@ static void testDupCert(void) } CertCloseStore(store, 0); + context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); + ok(context != NULL, "CertCreateCertificateContext failed\n"); + + dupContext = CertDuplicateCertificateContext(context); + ok(dupContext == context, "context != dupContext\n"); + + CertFreeCertificateContext(dupContext); + + store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + + ret = CertAddCertificateContextToStore(store, context, CERT_STORE_ADD_NEW, &storeContext); + ok(ret, "CertAddCertificateContextToStore failed\n"); + ok(storeContext != NULL && storeContext != context, "unexpected storeContext\n"); + ok(storeContext->hCertStore == store, "unexpected hCertStore\n"); + + ok(storeContext->pbCertEncoded != context->pbCertEncoded, "unexpected pbCertEncoded\n"); + ok(storeContext->cbCertEncoded == context->cbCertEncoded, "unexpected cbCertEncoded\n"); + ok(storeContext->pCertInfo != context->pCertInfo, "unexpected pCertInfo\n"); + + store2 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + ok(store2 != NULL, "CertOpenStore failed: %d\n", GetLastError()); + + ret = CertAddCertificateContextToStore(store2, storeContext, CERT_STORE_ADD_NEW, &storeContext2); + ok(ret, "CertAddCertificateContextToStore failed\n"); + ok(storeContext2 != NULL && storeContext2 != storeContext, "unexpected storeContext\n"); + ok(storeContext2->hCertStore == store2, "unexpected hCertStore\n"); + + ok(storeContext2->pbCertEncoded != storeContext->pbCertEncoded, "unexpected pbCertEncoded\n"); + ok(storeContext2->cbCertEncoded == storeContext->cbCertEncoded, "unexpected cbCertEncoded\n"); + ok(storeContext2->pCertInfo != storeContext->pCertInfo, "unexpected pCertInfo\n"); + + CertFreeCertificateContext(storeContext2); + CertFreeCertificateContext(storeContext); + + context2 = CertCreateCertificateContext(X509_ASN_ENCODING, certWithUsage, sizeof(certWithUsage)); + ok(context2 != NULL, "CertCreateCertificateContext failed\n"); + + ok(context2->hCertStore == context->hCertStore, "Unexpected hCertStore\n"); + + CertFreeCertificateContext(context2); + CertFreeCertificateContext(context); + + CertCloseStore(store, 0); + CertCloseStore(store2, 0); + SetLastError(0xdeadbeef); context = CertDuplicateCertificateContext(NULL); ok(context == NULL, "Expected context to be NULL\n"); } +static void testLinkCert(void) +{ + const CERT_CONTEXT *context, *link; + HCERTSTORE store; + BOOL ret; + + context = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert, sizeof(bigCert)); + ok(context != NULL, "CertCreateCertificateContext failed\n"); + + store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); + ok(store != NULL, "CertOpenStore failed: %d\n", GetLastError()); + + ret = CertAddCertificateLinkToStore(store, context, CERT_STORE_ADD_NEW, &link); + ok(ret, "CertAddCertificateContextToStore failed\n"); + ok(link != NULL && link != context, "unexpected storeContext\n"); + ok(link->hCertStore == store, "unexpected hCertStore\n"); + + ok(link->pbCertEncoded == context->pbCertEncoded, "unexpected pbCertEncoded\n"); + ok(link->cbCertEncoded == context->cbCertEncoded, "unexpected cbCertEncoded\n"); + ok(link->pCertInfo == context->pCertInfo, "unexpected pCertInfo\n"); + + CertFreeCertificateContext(link); + + CertCloseStore(store, 0); +} + static BYTE subjectName3[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x52, 0x6f, 0x62, 0x20, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00 }; @@ -3902,6 +3974,7 @@ START_TEST(cert) testFindCert(); testGetSubjectCert(); testGetIssuerCert(); + testLinkCert(); testCryptHashCert(); testCertSigs();
1
0
0
0
Jacek Caban : crypt32: Don't use links to certs in memory store.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 2601f58acb75758f6b3755da08c8571513143532 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2601f58acb75758f6b3755da0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Oct 17 11:06:44 2013 +0200 crypt32: Don't use links to certs in memory store. --- dlls/crypt32/cert.c | 158 +++++++++++++++++++++++----------------- dlls/crypt32/collectionstore.c | 12 ++-- dlls/crypt32/context.c | 4 +- dlls/crypt32/crl.c | 7 ++- dlls/crypt32/crypt32_private.h | 22 +++--- dlls/crypt32/ctl.c | 9 ++- dlls/crypt32/provstore.c | 18 ++-- dlls/crypt32/store.c | 17 ++-- 8 files changed, 140 insertions(+), 107 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2601f58acb75758f6b375…
1
0
0
0
Dmitry Timoshkov : gdiplus/tests: Add a test for GdipCloneBitmapArea called on an already locked bitmap.
by Alexandre Julliard
17 Oct '13
17 Oct '13
Module: wine Branch: master Commit: 4e14c45b8b1b4104b4ed21da95952f117f83988a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4e14c45b8b1b4104b4ed21da9…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Oct 17 10:08:53 2013 +0900 gdiplus/tests: Add a test for GdipCloneBitmapArea called on an already locked bitmap. --- dlls/gdiplus/tests/image.c | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index 9f5730e..650d12f 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -4240,6 +4240,33 @@ static void test_ARGB_conversion(void) GdipDisposeImage((GpImage *)bitmap); } + +static void test_CloneBitmapArea(void) +{ + GpStatus status; + GpBitmap *bitmap, *copy; + BitmapData data, data2; + + status = GdipCreateBitmapFromScan0(1, 1, 0, PixelFormat24bppRGB, NULL, &bitmap); + expect(Ok, status); + + status = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead | ImageLockModeWrite, PixelFormat24bppRGB, &data); + expect(Ok, status); + + status = GdipBitmapLockBits(bitmap, NULL, ImageLockModeRead, PixelFormat24bppRGB, &data2); + expect(WrongState, status); + + status = GdipCloneBitmapAreaI(0, 0, 1, 1, PixelFormat24bppRGB, bitmap, ©); +todo_wine + expect(Ok, status); + + status = GdipBitmapUnlockBits(bitmap, &data); + expect(Ok, status); + + GdipDisposeImage((GpImage *)copy); + GdipDisposeImage((GpImage *)bitmap); +} + START_TEST(image) { struct GdiplusStartupInput gdiplusStartupInput; @@ -4252,6 +4279,7 @@ START_TEST(image) GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + test_CloneBitmapArea(); test_ARGB_conversion(); test_DrawImage_scale(); test_image_format();
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
76
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Results per page:
10
25
50
100
200