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
May 2006
----- 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
3 participants
863 discussions
Start a n
N
ew thread
Eric Pouech : winedbg: extract_as_integer
by Alexandre Julliard
17 May '06
17 May '06
Module: wine Branch: refs/heads/master Commit: 820141114e89b1a4b1874a8ad235627f3e6fafce URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=820141114e89b1a4b1874a8…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Tue May 16 21:20:51 2006 +0200 winedbg: extract_as_integer - now supporting extract_as_integer on functions (so that, for example, 'disas foo' works as expected) - now properly handling errors when calling extract_as_integer --- programs/winedbg/types.c | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c index 052b8c6..93424d9 100644 --- a/programs/winedbg/types.c +++ b/programs/winedbg/types.c @@ -37,14 +37,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(winedbg); */ long int types_extract_as_integer(const struct dbg_lvalue* lvalue) { - long int rtn = 0; + long int rtn; LONGLONG val; DWORD tag, bt; DWORD64 size; if (lvalue->type.id == dbg_itype_none || !types_get_info(&lvalue->type, TI_GET_SYMTAG, &tag)) - return 0; + RaiseException(DEBUG_STATUS_NOT_AN_INTEGER, 0, 0, NULL); if (lvalue->type.id == dbg_itype_segptr) { @@ -63,17 +63,19 @@ long int types_extract_as_integer(const if (size > sizeof(rtn)) { WINE_ERR("Size too large (%s)\n", wine_dbgstr_longlong(size)); - return 0; + RaiseException(DEBUG_STATUS_NOT_AN_INTEGER, 0, 0, NULL); } switch (bt) { case btChar: case btInt: - if (!be_cpu->fetch_integer(lvalue, (unsigned)size, TRUE, &val)) return 0; + if (!be_cpu->fetch_integer(lvalue, (unsigned)size, TRUE, &val)) + RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); rtn = (long)val; break; case btUInt: - if (!be_cpu->fetch_integer(lvalue, (unsigned)size, FALSE, &val)) return 0; + if (!be_cpu->fetch_integer(lvalue, (unsigned)size, FALSE, &val)) + RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); rtn = (DWORD)(DWORD64)val; break; case btFloat: @@ -81,20 +83,26 @@ long int types_extract_as_integer(const } break; case SymTagPointerType: - if (!memory_read_value(lvalue, sizeof(void*), &rtn)) return 0; + if (!memory_read_value(lvalue, sizeof(void*), &rtn)) + RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); break; case SymTagArrayType: case SymTagUDT: assert(lvalue->cookie == DLV_TARGET); - if (!memory_read_value(lvalue, sizeof(rtn), &rtn)) return 0; + if (!memory_read_value(lvalue, sizeof(rtn), &rtn)) + RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); break; case SymTagEnum: assert(lvalue->cookie == DLV_TARGET); - if (!memory_read_value(lvalue, sizeof(rtn), &rtn)) return 0; + if (!memory_read_value(lvalue, sizeof(rtn), &rtn)) + RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); + break; + case SymTagFunctionType: + rtn = (unsigned)memory_to_linear_addr(&lvalue->addr); break; default: WINE_FIXME("Unsupported tag %lu\n", tag); - rtn = 0; + RaiseException(DEBUG_STATUS_NOT_AN_INTEGER, 0, 0, NULL); break; }
1
0
0
0
Juan Lang : crypt32: Get rid of CRYPT_CreateCertificateContext, it' s not needed anymore.
by Alexandre Julliard
17 May '06
17 May '06
Module: wine Branch: refs/heads/master Commit: 06bc59cd53b7b73603608a723b77daf3fc4f5451 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=06bc59cd53b7b73603608a7…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Tue May 16 13:52:33 2006 -0700 crypt32: Get rid of CRYPT_CreateCertificateContext, it's not needed anymore. --- dlls/crypt32/store.c | 25 +++++-------------------- 1 files changed, 5 insertions(+), 20 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index c9ca281..fa86abc 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -1749,10 +1749,8 @@ PCCRL_CONTEXT WINAPI CertCreateCRLContex return pcrl; } -/* Decodes the encoded certificate and creates the certificate context for it. - */ -static PWINE_CERT_CONTEXT CRYPT_CreateCertificateContext( - DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded) +PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, + const BYTE *pbCertEncoded, DWORD cbCertEncoded) { PWINE_CERT_CONTEXT_DATA cert = NULL; BOOL ret; @@ -1809,19 +1807,6 @@ static PWINE_CERT_CONTEXT CRYPT_CreateCe } end: - return (PWINE_CERT_CONTEXT)cert; -} - -PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, - const BYTE *pbCertEncoded, DWORD cbCertEncoded) -{ - PWINE_CERT_CONTEXT cert; - - TRACE("(%08lx, %p, %ld)\n", dwCertEncodingType, pbCertEncoded, - cbCertEncoded); - - cert = CRYPT_CreateCertificateContext(dwCertEncodingType, pbCertEncoded, - cbCertEncoded); return (PCCERT_CONTEXT)cert; } @@ -2293,14 +2278,14 @@ BOOL WINAPI CertAddEncodedCertificateToS ret = FALSE; else { - PWINE_CERT_CONTEXT cert = CRYPT_CreateCertificateContext( + PCCERT_CONTEXT cert = CertCreateCertificateContext( dwCertEncodingType, pbCertEncoded, cbCertEncoded); if (cert) { ret = CertAddCertificateContextToStore(hCertStore, - (PCCERT_CONTEXT)cert, dwAddDisposition, ppCertContext); - CertFreeCertificateContext((PCCERT_CONTEXT)cert); + cert, dwAddDisposition, ppCertContext); + CertFreeCertificateContext(cert); } else ret = FALSE;
1
0
0
0
Marcus Meissner : riched20: Removed useless double casts, just print the DWORD hexmask.
by Alexandre Julliard
17 May '06
17 May '06
Module: wine Branch: refs/heads/master Commit: 09f0ea1c769cdfdbac11a11a6b8b59fc35a59ebe URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=09f0ea1c769cdfdbac11a11…
Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Wed May 17 07:44:55 2006 +0200 riched20: Removed useless double casts, just print the DWORD hexmask. --- dlls/riched20/tests/editor.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/riched20/tests/editor.c b/dlls/riched20/tests/editor.c index 837fb15..703ddb1 100644 --- a/dlls/riched20/tests/editor.c +++ b/dlls/riched20/tests/editor.c @@ -386,8 +386,8 @@ static void test_EM_SETTEXTMODE(void) /*Test that the two formattings are not the same*/ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects != cf2test.dwEffects), - "expected different formats - cf2.dwMask: %f, cf2test.dwMask: %f, cf2.dwEffects: %f, cf2test.dwEffects: %f\n", - (double) cf2.dwMask, (double) cf2test.dwMask, (double) cf2.dwEffects, (double) cf2test.dwEffects); + "expected different formats - cf2.dwMask: %lx, cf2test.dwMask: %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", + cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); DestroyWindow(hwndRichEdit); } @@ -437,8 +437,8 @@ static void test_TM_PLAINTEXT() /*Test that they are the same as plain text allows only one formatting*/ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "two selections' formats differ - cf2.dwMask: %f, cf2test.dwMask %f, cf2.dwEffects: %f, cf2test.dwEffects: %f\n", - (double) cf2.dwMask, (double) cf2test.dwMask, (double) cf2.dwEffects, (double) cf2test.dwEffects); + "two selections' formats differ - cf2.dwMask: %lx, cf2test.dwMask %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", + cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); /*Fill the control with a "wine" string, which when inserted will be bold*/ @@ -489,8 +489,8 @@ static void test_TM_PLAINTEXT() /*Compare the two formattings. They should be the same.*/ ok((cf2.dwMask == cf2test.dwMask) && (cf2.dwEffects == cf2test.dwEffects), - "Copied text retained formatting - cf2.dwMask: %f, cf2test.dwMask: %f, cf2.dwEffects: %f, cf2test.dwEffects: %f\n", - (double) cf2.dwMask, (double) cf2test.dwMask, (double) cf2.dwEffects, (double) cf2test.dwEffects); + "Copied text retained formatting - cf2.dwMask: %lx, cf2test.dwMask: %lx, cf2.dwEffects: %lx, cf2test.dwEffects: %lx\n", + cf2.dwMask, cf2test.dwMask, cf2.dwEffects, cf2test.dwEffects); DestroyWindow(hwndRichEdit); }
1
0
0
0
Juan Lang : crypt32: Split the unwieldy encode.c into two files.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: f224b34e60fe33559b8c535c18d81a0e1446cf2c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=f224b34e60fe33559b8c535…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Mon May 15 17:01:28 2006 -0700 crypt32: Split the unwieldy encode.c into two files. --- dlls/crypt32/Makefile.in | 1 dlls/crypt32/crypt32_private.h | 11 dlls/crypt32/decode.c | 3075 ++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/encode.c | 3047 ---------------------------------------- 4 files changed, 3094 insertions(+), 3040 deletions(-) create mode 100644 dlls/crypt32/decode.c Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=f224b34e60fe33559b8…
1
0
0
0
Juan Lang : crypt32: Support CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID implicit property.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: 50f9defece12322c4c317ccfbce3a276407cd13c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=50f9defece12322c4c317cc…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Tue May 16 11:12:31 2006 -0700 crypt32: Support CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID implicit property. --- dlls/crypt32/store.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 6fafc5a..c9ca281 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -1931,9 +1931,14 @@ static BOOL WINAPI CertContext_GetProper context->cert.pCertInfo->SubjectPublicKeyInfo.PublicKey.cbData, pvData, pcbData); break; - case CERT_SIGNATURE_HASH_PROP_ID: case CERT_ISSUER_SERIAL_NUMBER_MD5_HASH_PROP_ID: - FIXME("implicit property %ld\n", dwPropId); + ret = CertContext_GetHashProp(context, dwPropId, CALG_MD5, + context->cert.pCertInfo->SerialNumber.pbData, + context->cert.pCertInfo->SerialNumber.cbData, + pvData, pcbData); + break; + case CERT_SIGNATURE_HASH_PROP_ID: + FIXME("CERT_SIGNATURE_HASH_PROP_ID unimplemented\n"); SetLastError(CRYPT_E_NOT_FOUND); break; default:
1
0
0
0
Juan Lang : crypt32: Use the caller-supplied encoding type when decoding certs.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: 9b589c3556b425455b17902ffe0f5f21aaeb8fe2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=9b589c3556b425455b17902…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Tue May 16 11:11:15 2006 -0700 crypt32: Use the caller-supplied encoding type when decoding certs. --- dlls/crypt32/store.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 5ba176a..6fafc5a 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -1764,12 +1764,12 @@ static PWINE_CERT_CONTEXT CRYPT_CreateCe cbCertEncoded); /* First try to decode it as a signed cert. */ - ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT, pbCertEncoded, + ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT, pbCertEncoded, cbCertEncoded, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&signedCert, &size); if (ret) { size = 0; - ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, + ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT_TO_BE_SIGNED, signedCert->ToBeSigned.pbData, signedCert->ToBeSigned.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, (BYTE *)&certInfo, &size); LocalFree(signedCert); @@ -1778,7 +1778,7 @@ static PWINE_CERT_CONTEXT CRYPT_CreateCe if (!ret) { size = 0; - ret = CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, + ret = CryptDecodeObjectEx(dwCertEncodingType, X509_CERT_TO_BE_SIGNED, pbCertEncoded, cbCertEncoded, CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG, NULL, (BYTE *)&certInfo, &size);
1
0
0
0
Juan Lang : crypt32: Add more tests for adding certs to a store.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: 73e825fb37f8bdb0a5f41930618cbc4fd20ea29c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=73e825fb37f8bdb0a5f4193…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Tue May 16 10:45:55 2006 -0700 crypt32: Add more tests for adding certs to a store. --- dlls/crypt32/tests/store.c | 47 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 45 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 6df1ea2..6addaae 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -98,6 +98,17 @@ static const BYTE bigCert2[] = { 0x30, 0 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 }; +static const BYTE bigCert2WithDifferentSerial[] = { 0x30, 0x7a, 0x02, 0x01, + 0x02, 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, + 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, + 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, + 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, + 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, + 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, + 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, + 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, + 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, + 0x02, 0x01, 0x01 }; static const BYTE subjectName2[] = { 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00 }; @@ -116,6 +127,17 @@ static const BYTE certWithUsage[] = { 0x 0x05, 0x05, 0x07, 0x03, 0x03, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01 }; static const BYTE serialNum[] = { 1 }; +static const BYTE bigCertWithDifferentIssuer[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, + 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, + 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, + 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, + 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, + 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, + 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, + 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, + 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, + 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, + 0x01, 0x01 }; static void testAddCert(void) { @@ -180,9 +202,30 @@ static void testAddCert(void) CertFreeCertificateContext(context); } - /* FIXME: test whether adding a cert with the same subject name and - * serial number (but different otherwise) as an existing cert works. + /* Adding a cert that differs by nothing more than serial number + * succeeds. */ + context = NULL; + ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, + bigCert2WithDifferentSerial, sizeof(bigCert2WithDifferentSerial), + CERT_STORE_ADD_NEW, &context); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", + GetLastError()); + if (context) + CertDeleteCertificateFromStore(context); + + /* Adding a cert with the same issuer name and serial number (but + * different otherwise) as an existing cert succeeds. + */ + context = NULL; + ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, + bigCertWithDifferentIssuer, sizeof(bigCertWithDifferentIssuer), + CERT_STORE_ADD_NEW, &context); + ok(ret, "CertAddEncodedCertificateToStore failed: %08lx\n", + GetLastError()); + if (context) + CertDeleteCertificateFromStore(context); + collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL); ok(collection != NULL, "CertOpenStore failed: %08lx\n", GetLastError());
1
0
0
0
Juan Lang : crypt32: Implement CertCompare functions, with tests.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: d0505de67412876aef70c885a0234fbc9394d343 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d0505de67412876aef70c88…
Author: Juan Lang <juan_lang(a)yahoo.com> Date: Tue May 16 10:39:29 2006 -0700 crypt32: Implement CertCompare functions, with tests. --- dlls/crypt32/cert.c | 88 +++++++++++++++++++++++++ dlls/crypt32/crypt32.spec | 8 +- dlls/crypt32/tests/cert.c | 158 +++++++++++++++++++++++++++++++++++++++++++++ include/wincrypt.h | 9 +++ 4 files changed, 259 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=d0505de67412876aef7…
1
0
0
0
Mikołaj Zalewski : comctl32: header: Fix INSERTITEM on a zero mask and GETITEM on a mask with unknown fields.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: 36a8e5fba340cc15a2e76bbd5608772b8bce4dff URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=36a8e5fba340cc15a2e76bb…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue May 16 00:10:08 2006 +0200 comctl32: header: Fix INSERTITEM on a zero mask and GETITEM on a mask with unknown fields. INSERTITEM should fail on a zero mask. If in GETITEM the mask has an unknown field it should store only the comctl32 4.0 fields (with test case). --- dlls/comctl32/header.c | 37 +++++++++++++++++++--------- dlls/comctl32/tests/header.c | 56 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index dc533e1..4dec2d7 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -98,6 +98,11 @@ #define MAX_HEADER_TEXT_LEN 260 #define HDN_UNICODE_OFFSET 20 #define HDN_FIRST_UNICODE (HDN_FIRST-HDN_UNICODE_OFFSET) +#define HDI_SUPPORTED_FIELDS (HDI_WIDTH|HDI_TEXT|HDI_FORMAT|HDI_LPARAM|HDI_BITMAP|HDI_IMAGE|HDI_ORDER) +#define HDI_UNSUPPORTED_FIELDS (HDI_FILTER) +#define HDI_UNKNOWN_FIELDS (~(HDI_SUPPORTED_FIELDS|HDI_UNSUPPORTED_FIELDS|HDI_DI_SETITEM)) +#define HDI_COMCTL32_4_0_FIELDS (HDI_WIDTH|HDI_TEXT|HDI_FORMAT|HDI_LPARAM|HDI_BITMAP) + #define HEADER_GetInfoPtr(hwnd) ((HEADER_INFO *)GetWindowLongPtrW(hwnd,0)) static BOOL HEADER_PrepareCallbackItems(HWND hwnd, INT iItem, INT reqMask); @@ -116,6 +121,9 @@ static void HEADER_DisposeItem(HEADER_IT static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, HDITEMW *phdi, BOOL fUnicode) { + if (mask & HDI_UNSUPPORTED_FIELDS) + FIXME("unsupported header fields %x\n", (mask & HDI_UNSUPPORTED_FIELDS)); + if (mask & HDI_BITMAP) lpItem->hbm = phdi->hbm; @@ -955,41 +963,46 @@ HEADER_GetItemT (HWND hwnd, INT nItem, L { HEADER_INFO *infoPtr = HEADER_GetInfoPtr (hwnd); HEADER_ITEM *lpItem; + UINT mask = phdi->mask; if (!phdi) return FALSE; TRACE("[nItem=%d]\n", nItem); - if (phdi->mask == 0) + if (mask == 0) return TRUE; if ((nItem < 0) || (nItem >= (INT)infoPtr->uNumItem)) return FALSE; + if (mask & HDI_UNKNOWN_FIELDS) + { + TRACE("mask %x contains unknown fields. Using only comctl32 4.0 fields\n", mask); + mask &= HDI_COMCTL32_4_0_FIELDS; + } + lpItem = &infoPtr->items[nItem]; - HEADER_PrepareCallbackItems(hwnd, nItem, phdi->mask); + HEADER_PrepareCallbackItems(hwnd, nItem, mask); - if (phdi->mask & HDI_BITMAP) + if (mask & HDI_BITMAP) phdi->hbm = lpItem->hbm; - if (phdi->mask & HDI_FORMAT) + if (mask & HDI_FORMAT) phdi->fmt = lpItem->fmt; - if (phdi->mask & HDI_WIDTH) + if (mask & HDI_WIDTH) phdi->cxy = lpItem->cxy; - if (phdi->mask & HDI_LPARAM) + if (mask & HDI_LPARAM) phdi->lParam = lpItem->lParam; - if (phdi->mask & HDI_IMAGE) - { + if (mask & HDI_IMAGE) phdi->iImage = lpItem->iImage; - } - if (phdi->mask & HDI_ORDER) + if (mask & HDI_ORDER) phdi->iOrder = lpItem->iOrder; - if (phdi->mask & HDI_TEXT) + if (mask & HDI_TEXT) { if (bUnicode) Str_GetPtrW (lpItem->pszText, phdi->pszText, phdi->cchTextMax); @@ -1094,7 +1107,7 @@ HEADER_InsertItemT (HWND hwnd, INT nItem UINT i; UINT copyMask; - if ((phdi == NULL) || (nItem < 0)) + if ((phdi == NULL) || (nItem < 0) || (phdi->mask == 0)) return -1; if (nItem > infoPtr->uNumItem) diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 856bfc6..eb06bb0 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -321,6 +321,60 @@ static void check_auto_fields(void) /* field from comctl >4.0 not tested as the system probably won't touch them */ } +static void check_mask() +{ + HDITEMA hdi; + LRESULT ret; + + /* don't create items if the mask is zero */ + ZeroMemory(&hdi, sizeof(hdi)); + hdi.mask = 0; + hdi.cxy = 200; + hdi.pszText = "ABC"; + hdi.fmt = 0; + hdi.iOrder = 0; + hdi.lParam = 17; + hdi.cchTextMax = 260; + ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ok(ret == -1, "Creating an item with a zero mask should have failed\n"); + if (ret != -1) SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + + /* with a non-zero mask creation will succeed */ + ZeroMemory(&hdi, sizeof(hdi)); + hdi.mask = HDI_LPARAM; + ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ok(ret != -1, "Adding item with non-zero mask failed\n"); + if (ret != -1) + SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + + /* in SETITEM if the mask contains a unknown bit, it is ignored */ + ZeroMemory(&hdi, sizeof(hdi)); + hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; + hdi.lParam = 133; + hdi.iImage = 17; + ret = SendMessage(hWndHeader, HDM_INSERTITEM, (WPARAM)0, (LPARAM)&hdi); + ok(ret != -1, "Adding item failed\n"); + + if (ret != -1) + { + /* check result */ + ZeroMemory(&hdi, sizeof(hdi)); + hdi.mask = HDI_LPARAM | HDI_IMAGE; + SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi); + ok(hdi.lParam == 133, "comctl32 4.0 field not set\n"); + ok(hdi.iImage == 17, "comctl32 >4.0 field not set\n"); + + /* but in GETITEM if an unknown bit is set, comctl32 uses only version 4.0 fields */ + ZeroMemory(&hdi, sizeof(hdi)); + hdi.mask = 0x08000000 | HDI_LPARAM | HDI_IMAGE; + SendMessage(hWndHeader, HDM_GETITEM, (WPARAM)0, (LPARAM)&hdi); + ok(hdi.lParam == 133, "comctl32 4.0 field not read\n"); + ok(hdi.iImage == 0, "comctl32 >4.0 field shouldn't be read\n"); + + SendMessage(hWndHeader, HDM_DELETEITEM, (WPARAM)0, (LPARAM)0); + } +} + static void test_header_control (void) { LONG res; @@ -396,6 +450,8 @@ static void test_header_control (void) TEST_GET_ITEMCOUNT(6); check_auto_fields(); TEST_GET_ITEMCOUNT(6); + check_mask(); + TEST_GET_ITEMCOUNT(6); res = delItem(hWndHeader, 5); ok(res == 1, "Deleting Out of Range item should fail with 1 (%ld)\n", res);
1
0
0
0
Mikołaj Zalewski : comctl32: header: Copy some fields on INSERTITEM even if they are not in the mask.
by Alexandre Julliard
16 May '06
16 May '06
Module: wine Branch: refs/heads/master Commit: bf346b240d2954aa4da208e2e4871fc38d3b9774 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=bf346b240d2954aa4da208e…
Author: Mikołaj Zalewski <mikolaj(a)zalewski.pl> Date: Tue May 16 00:05:28 2006 +0200 comctl32: header: Copy some fields on INSERTITEM even if they are not in the mask. --- dlls/comctl32/header.c | 21 +++++++++------- dlls/comctl32/tests/header.c | 54 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 9 deletions(-) diff --git a/dlls/comctl32/header.c b/dlls/comctl32/header.c index b91524e..dc533e1 100644 --- a/dlls/comctl32/header.c +++ b/dlls/comctl32/header.c @@ -114,21 +114,21 @@ static void HEADER_DisposeItem(HEADER_IT } } -static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, HDITEMW *phdi, BOOL fUnicode) +static void HEADER_StoreHDItemInHeader(HEADER_ITEM *lpItem, UINT mask, HDITEMW *phdi, BOOL fUnicode) { - if (phdi->mask & HDI_BITMAP) + if (mask & HDI_BITMAP) lpItem->hbm = phdi->hbm; - if (phdi->mask & HDI_FORMAT) + if (mask & HDI_FORMAT) lpItem->fmt = phdi->fmt; - if (phdi->mask & HDI_LPARAM) + if (mask & HDI_LPARAM) lpItem->lParam = phdi->lParam; - if (phdi->mask & HDI_WIDTH) + if (mask & HDI_WIDTH) lpItem->cxy = phdi->cxy; - if (phdi->mask & HDI_IMAGE) + if (mask & HDI_IMAGE) { lpItem->iImage = phdi->iImage; if (phdi->iImage == I_IMAGECALLBACK) @@ -137,7 +137,7 @@ static void HEADER_StoreHDItemInHeader(H lpItem->callbackMask &= ~HDI_IMAGE; } - if (phdi->mask & HDI_TEXT) + if (mask & HDI_TEXT) { if (lpItem->pszText) { @@ -1092,6 +1092,7 @@ HEADER_InsertItemT (HWND hwnd, INT nItem HEADER_ITEM *lpItem; INT iOrder; UINT i; + UINT copyMask; if ((phdi == NULL) || (nItem < 0)) return -1; @@ -1154,7 +1155,9 @@ HEADER_InsertItemT (HWND hwnd, INT nItem lpItem = &infoPtr->items[nItem]; ZeroMemory(lpItem, sizeof(HEADER_ITEM)); - HEADER_StoreHDItemInHeader(lpItem, phdi, bUnicode); + /* cxy, fmt and lParam are copied even if not in the HDITEM mask */ + copyMask = phdi->mask | HDI_WIDTH | HDI_FORMAT | HDI_LPARAM; + HEADER_StoreHDItemInHeader(lpItem, copyMask, phdi, bUnicode); /* set automatically some format bits */ if (phdi->mask & HDI_TEXT) @@ -1267,7 +1270,7 @@ HEADER_SetItemT (HWND hwnd, INT nItem, L } lpItem = &infoPtr->items[nItem]; - HEADER_StoreHDItemInHeader(lpItem, phdi, bUnicode); + HEADER_StoreHDItemInHeader(lpItem, phdi->mask, phdi, bUnicode); if (phdi->mask & HDI_ORDER) { diff --git a/dlls/comctl32/tests/header.c b/dlls/comctl32/tests/header.c index 7e0fda7..856bfc6 100644 --- a/dlls/comctl32/tests/header.c +++ b/dlls/comctl32/tests/header.c @@ -269,6 +269,58 @@ static void check_auto_format(void) ok(hdiRead.fmt == (HDF_CENTER|HDF_IMAGE), "HDF_IMAGE shouldn't be cleared automatically (fmt=%x)\n", hdiRead.fmt); } +static void check_auto_fields(void) +{ + HDITEMA hdiCreate; + HDITEMA hdiRead; + LRESULT res; + + /* Windows stores the format, width, lparam even if they are not in the item's mask */ + ZeroMemory(&hdiCreate, sizeof(HDITEMA)); + hdiCreate.mask = HDI_TEXT; + hdiCreate.cxy = 100; + hdiCreate.pszText = "Test"; + addReadDelItem(hWndHeader, &hdiCreate, HDI_WIDTH, &hdiRead); + TEST_GET_ITEMCOUNT(6); + ok(hdiRead.cxy == hdiCreate.cxy, "cxy should be automatically set\n"); + + ZeroMemory(&hdiCreate, sizeof(HDITEMA)); + hdiCreate.mask = HDI_TEXT; + hdiCreate.pszText = "Test"; + hdiCreate.lParam = 0x12345678; + addReadDelItem(hWndHeader, &hdiCreate, HDI_LPARAM, &hdiRead); + TEST_GET_ITEMCOUNT(6); + ok(hdiRead.lParam == hdiCreate.lParam, "lParam should be automatically set\n"); + + ZeroMemory(&hdiCreate, sizeof(HDITEMA)); + hdiCreate.mask = HDI_TEXT; + hdiCreate.pszText = "Test"; + hdiCreate.fmt = HDF_STRING|HDF_CENTER; + addReadDelItem(hWndHeader, &hdiCreate, HDI_FORMAT, &hdiRead); + TEST_GET_ITEMCOUNT(6); + ok(hdiRead.fmt == hdiCreate.fmt, "fmt should be automatically set\n"); + + /* others fields are not set */ + ZeroMemory(&hdiCreate, sizeof(HDITEMA)); + hdiCreate.mask = HDI_TEXT; + hdiCreate.pszText = "Test"; + hdiCreate.hbm = CreateBitmap(16, 16, 1, 8, NULL); + addReadDelItem(hWndHeader, &hdiCreate, HDI_BITMAP, &hdiRead); + TEST_GET_ITEMCOUNT(6); + ok(hdiRead.hbm == NULL, "hbm should not be automatically set\n"); + DeleteObject(hdiCreate.hbm); + + ZeroMemory(&hdiCreate, sizeof(HDITEMA)); + hdiCreate.mask = HDI_IMAGE; + hdiCreate.iImage = 17; + hdiCreate.pszText = "Test"; + addReadDelItem(hWndHeader, &hdiCreate, HDI_TEXT, &hdiRead); + TEST_GET_ITEMCOUNT(6); + ok(hdiRead.pszText==NULL, "pszText shouldn't be automatically set\n"); + + /* field from comctl >4.0 not tested as the system probably won't touch them */ +} + static void test_header_control (void) { LONG res; @@ -342,6 +394,8 @@ static void test_header_control (void) check_auto_format(); TEST_GET_ITEMCOUNT(6); + check_auto_fields(); + TEST_GET_ITEMCOUNT(6); res = delItem(hWndHeader, 5); ok(res == 1, "Deleting Out of Range item should fail with 1 (%ld)\n", res);
1
0
0
0
← Newer
1
...
40
41
42
43
44
45
46
...
87
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
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200