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
November 2009
----- 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
910 discussions
Start a n
N
ew thread
Juan Lang : crypt32: Implement CertStoreControl for collection stores.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 416cd484b2e78f8d5a085c3b859f5d4b8b8a4b1f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=416cd484b2e78f8d5a085c3b8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Nov 3 11:02:03 2009 -0800 crypt32: Implement CertStoreControl for collection stores. --- dlls/crypt32/collectionstore.c | 40 ++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/store.c | 1 - 2 files changed, 40 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/collectionstore.c b/dlls/crypt32/collectionstore.c index e55c1bf..35941dd 100644 --- a/dlls/crypt32/collectionstore.c +++ b/dlls/crypt32/collectionstore.c @@ -441,6 +441,45 @@ static BOOL CRYPT_CollectionDeleteCTL(PWINECRYPT_CERTSTORE store, return ret; } +static BOOL WINAPI CRYPT_CollectionControl(HCERTSTORE hCertStore, DWORD dwFlags, + DWORD dwCtrlType, void const *pvCtrlPara) +{ + BOOL ret; + PWINE_COLLECTIONSTORE store = hCertStore; + PWINE_STORE_LIST_ENTRY entry; + + TRACE("(%p, %08x, %d, %p)\n", hCertStore, dwFlags, dwCtrlType, + pvCtrlPara); + + if (!store) + return TRUE; + if (store->hdr.dwMagic != WINE_CRYPTCERTSTORE_MAGIC) + { + SetLastError(E_INVALIDARG); + return FALSE; + } + if (store->hdr.type != StoreTypeCollection) + { + SetLastError(E_INVALIDARG); + return FALSE; + } + + ret = TRUE; + EnterCriticalSection(&store->cs); + LIST_FOR_EACH_ENTRY(entry, &store->stores, WINE_STORE_LIST_ENTRY, entry) + { + if (entry->store->control) + { + ret = entry->store->control(entry->store, dwFlags, dwCtrlType, + pvCtrlPara); + if (!ret) + break; + } + } + LeaveCriticalSection(&store->cs); + return ret; +} + PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags, const void *pvPara) { @@ -468,6 +507,7 @@ PWINECRYPT_CERTSTORE CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv, store->hdr.ctls.addContext = CRYPT_CollectionAddCTL; store->hdr.ctls.enumContext = CRYPT_CollectionEnumCTL; store->hdr.ctls.deleteContext = CRYPT_CollectionDeleteCTL; + store->hdr.control = CRYPT_CollectionControl; InitializeCriticalSection(&store->cs); store->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_COLLECTIONSTORE->cs"); list_init(&store->stores); diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index ff39d71..ee91e73 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -658,7 +658,6 @@ static void testCollectionStore(void) pCertAddStoreToCollection(collection, store1, 0, 0); SetLastError(0xdeadbeef); ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); - todo_wine ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, "expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); pCertRemoveStoreFromCollection(collection, store1);
1
0
0
0
Juan Lang : crypt32: Add an implementation of CertControlStore for memory stores.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 33c70d35dd9e7c3e8bd257dd9824015bb7f117fa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33c70d35dd9e7c3e8bd257dd9…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Nov 3 10:59:50 2009 -0800 crypt32: Add an implementation of CertControlStore for memory stores. --- dlls/crypt32/store.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index e1cce40..69578f2 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -283,6 +283,13 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext) return ret; } +static BOOL WINAPI CRYPT_MemControl(HCERTSTORE hCertStore, DWORD dwFlags, + DWORD dwCtrlType, void const *pvCtrlPara) +{ + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) { WINE_MEMSTORE *store = hCertStore; @@ -326,7 +333,7 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv, store->hdr.ctls.addContext = CRYPT_MemAddCtl; store->hdr.ctls.enumContext = CRYPT_MemEnumCtl; store->hdr.ctls.deleteContext = CRYPT_MemDeleteCtl; - store->hdr.control = NULL; + store->hdr.control = CRYPT_MemControl; store->certs = ContextList_Create(pCertInterface, sizeof(CERT_CONTEXT)); store->crls = ContextList_Create(pCRLInterface,
1
0
0
0
Juan Lang : crypt32: Add tests of committing a collection store.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: e6047ae52d6f78a7983e9738c9c68603ccfa42a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e6047ae52d6f78a7983e9738c…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Nov 3 10:58:19 2009 -0800 crypt32: Add tests of committing a collection store. --- dlls/crypt32/tests/store.c | 138 ++++++++++++++++++++++++++++++++------------ 1 files changed, 101 insertions(+), 37 deletions(-) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 5c019fa..ff39d71 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -277,11 +277,53 @@ static void testMemStore(void) CertCloseStore(store1, 0); } +static void compareFile(LPCWSTR filename, const BYTE *pb, DWORD cb) +{ + HANDLE h; + BYTE buf[200]; + BOOL ret; + DWORD cbRead = 0, totalRead = 0; + + h = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) + return; + do { + ret = ReadFile(h, buf, sizeof(buf), &cbRead, NULL); + if (ret && cbRead) + { + ok(totalRead + cbRead <= cb, "Expected total count %d, see %d\n", + cb, totalRead + cbRead); + ok(!memcmp(pb + totalRead, buf, cbRead), + "Unexpected data in file\n"); + totalRead += cbRead; + } + } while (ret && cbRead); + CloseHandle(h); +} + +static const BYTE serializedStoreWithCert[] = { + 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00, + 0x00,0x7c,0x00,0x00,0x00,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,0x4a,0x75,0x61,0x6e, + 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,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00 }; + static void testCollectionStore(void) { HCERTSTORE store1, store2, collection, collection2; PCCERT_CONTEXT context; BOOL ret; + static const WCHAR szPrefix[] = { 'c','e','r',0 }; + static const WCHAR szDot[] = { '.',0 }; + WCHAR filename[MAX_PATH]; + HANDLE file; if (!pCertAddStoreToCollection) { @@ -595,6 +637,65 @@ static void testCollectionStore(void) CertCloseStore(collection, 0); CertCloseStore(store1, 0); + + /* Test whether a collection store can be committed */ + if (!pCertControlStore) + { + win_skip("CertControlStore() is not available\n"); + return; + } + collection = CertOpenStore(CERT_STORE_PROV_COLLECTION, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + + SetLastError(0xdeadbeef); + ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); + ok(ret, "CertControlStore failed: %08x\n", GetLastError()); + + /* Adding a mem store that can't be committed prevents a successful commit. + */ + store1 = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, + CERT_STORE_CREATE_NEW_FLAG, NULL); + pCertAddStoreToCollection(collection, store1, 0, 0); + SetLastError(0xdeadbeef); + ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); + todo_wine + ok(!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED, + "expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n", GetLastError()); + pCertRemoveStoreFromCollection(collection, store1); + CertCloseStore(store1, 0); + + /* Test adding a cert to a collection with a file store, committing the + * change to the collection, and comparing the resulting file. + */ + if (!GetTempFileNameW(szDot, szPrefix, 0, filename)) + return; + + DeleteFileW(filename); + file = CreateFileW(filename, GENERIC_READ | GENERIC_WRITE, 0, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); + if (file == INVALID_HANDLE_VALUE) + return; + + store1 = CertOpenStore(CERT_STORE_PROV_FILE, 0, 0, + CERT_FILE_STORE_COMMIT_ENABLE_FLAG, file); + ok(store1 != NULL, "CertOpenStore failed: %08x\n", GetLastError()); + CloseHandle(file); + pCertAddStoreToCollection(collection, store1, + CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG, 0); + CertCloseStore(store1, 0); + + ret = CertAddEncodedCertificateToStore(collection, X509_ASN_ENCODING, + bigCert, sizeof(bigCert), CERT_STORE_ADD_ALWAYS, NULL); + ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", + GetLastError()); + ret = pCertControlStore(collection, 0, CERT_STORE_CTRL_COMMIT, NULL); + ok(ret, "CertControlStore failed: %d\n", ret); + + CertCloseStore(collection, 0); + + compareFile(filename, serializedStoreWithCert, + sizeof(serializedStoreWithCert)); + DeleteFileW(filename); } /* Looks for the property with ID propID in the buffer buf. Returns a pointer @@ -1068,18 +1169,6 @@ static void testSystemStore(void) RegDeleteKeyW(HKEY_CURRENT_USER, BogusPathW); } -static const BYTE serializedStoreWithCert[] = { - 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00, - 0x00,0x7c,0x00,0x00,0x00,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,0x4a,0x75,0x61,0x6e, - 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,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00 }; static const BYTE serializedStoreWithCertAndCRL[] = { 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00, 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30, @@ -1098,31 +1187,6 @@ static const BYTE serializedStoreWithCertAndCRL[] = { 0x00,0x0f,0x0e,0x0d,0x0c,0x0b,0x0a,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; -static void compareFile(LPCWSTR filename, const BYTE *pb, DWORD cb) -{ - HANDLE h; - BYTE buf[200]; - BOOL ret; - DWORD cbRead = 0, totalRead = 0; - - h = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - if (h == INVALID_HANDLE_VALUE) - return; - do { - ret = ReadFile(h, buf, sizeof(buf), &cbRead, NULL); - if (ret && cbRead) - { - ok(totalRead + cbRead <= cb, "Expected total count %d, see %d\n", - cb, totalRead + cbRead); - ok(!memcmp(pb + totalRead, buf, cbRead), - "Unexpected data in file\n"); - totalRead += cbRead; - } - } while (ret && cbRead); - CloseHandle(h); -} - static void testFileStore(void) { static const WCHAR szPrefix[] = { 'c','e','r',0 };
1
0
0
0
Ilya Shpigor : extrac32: Add command-line parsing.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: e7cc2868aadd110a99f91b68737c48545505e09c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e7cc2868aadd110a99f91b687…
Author: Ilya Shpigor <shpigor(a)etersoft.ru> Date: Tue Nov 3 10:55:12 2009 +0300 extrac32: Add command-line parsing. --- programs/extrac32/Makefile.in | 2 +- programs/extrac32/extrac32.c | 86 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletions(-) diff --git a/programs/extrac32/Makefile.in b/programs/extrac32/Makefile.in index 470c196..31aa7e0 100644 --- a/programs/extrac32/Makefile.in +++ b/programs/extrac32/Makefile.in @@ -5,7 +5,7 @@ VPATH = @srcdir@ MODULE = extrac32.exe APPMODE = -mwindows -municode EXTRADEFS = -DWINE_NO_UNICODE -IMPORTS = kernel32 +IMPORTS = shell32 user32 kernel32 C_SRCS = \ extrac32.c diff --git a/programs/extrac32/extrac32.c b/programs/extrac32/extrac32.c index 7e8fbed..e6fefc9 100644 --- a/programs/extrac32/extrac32.c +++ b/programs/extrac32/extrac32.c @@ -2,6 +2,7 @@ * Extract - Wine-compatible program for extract *.cab files. * * Copyright 2007 Etersoft (Lyutin Anatoly) + * Copyright 2009 Ilya Shpigor * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,6 +20,7 @@ */ #include <windows.h> +#include <shellapi.h> #include "wine/unicode.h" #include "wine/debug.h" @@ -27,5 +29,89 @@ WINE_DEFAULT_DEBUG_CHANNEL(extrac32); int PASCAL wWinMain(HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int show) { + LPWSTR *argv; + int argc; + int i; + WCHAR check, cmd = 0; + WCHAR path[MAX_PATH]; + WCHAR backslash[] = {'\\',0}; + LPCWSTR cabfile = NULL; + + path[0] = 0; + argv = CommandLineToArgvW(cmdline, &argc); + + if(!argv) + { + WINE_ERR("Bad command line arguments\n"); + return 0; + } + + /* Parse arguments */ + for(i = 0; i < argc; i++) + { + /* Get cabfile */ + if ((argv[i][0] != '/') && !cabfile) + { + cabfile = argv[i]; + continue; + } + /* Get parameters for commands */ + check = toupperW( argv[i][1] ); + switch(check) + { + case 'A': + WINE_FIXME("/A not implemented\n"); + break; + case 'Y': + WINE_FIXME("/Y not implemented\n"); + break; + case 'L': + if ((i + 1) >= argc) return 0; + if (!GetFullPathNameW(argv[++i], MAX_PATH, path, NULL)) + return 0; + break; + case 'C': + if (cmd) return 0; + if ((i + 2) >= argc) return 0; + cmd = check; + cabfile = argv[++i]; + if (!GetFullPathNameW(argv[++i], MAX_PATH, path, NULL)) + return 0; + break; + case 'E': + case 'D': + if (cmd) return 0; + cmd = check; + break; + default: + return 0; + } + } + + if (!cabfile) + return 0; + + if (!path[0]) + GetCurrentDirectoryW(MAX_PATH, path); + + lstrcatW(path, backslash); + + /* Execute the specified command */ + switch(cmd) + { + case 'C': + /* Copy file */ + WINE_FIXME("/C not implemented\n"); + break; + case 'E': + /* Extract CAB archive */ + WINE_FIXME("/E not implemented\n"); + break; + case 0: + case 'D': + /* Display CAB archive */ + WINE_FIXME("/D not implemented\n"); + break; + } return 0; }
1
0
0
0
Huw Davies : ntdll/tests: Fix spelling of succeeded.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 95c525e21ba47c2c4260a0ee8ee2b058939c9a09 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=95c525e21ba47c2c4260a0ee8…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 11:30:47 2009 +0000 ntdll/tests: Fix spelling of succeeded. --- dlls/ntdll/tests/exception.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c index f693960..9149b69 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c @@ -1010,7 +1010,7 @@ static void test_dpe_exceptions(void) /* Try access to locked page with DEP on*/ info.exception_caught = FALSE; run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_NOACCESS); - ok(info.exception_caught == TRUE, "Execution of disabled memory suceeded\n"); + ok(info.exception_caught == TRUE, "Execution of disabled memory succeeded\n"); ok(info.exception_info == EXCEPTION_READ_FAULT || info.exception_info == EXCEPTION_EXECUTE_FAULT, "Access violation type: %08x\n", (unsigned)info.exception_info); @@ -1022,7 +1022,7 @@ static void test_dpe_exceptions(void) run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_READWRITE); if(has_hw_support) { - ok(info.exception_caught == TRUE, "Execution of data memory suceeded\n"); + ok(info.exception_caught == TRUE, "Execution of data memory succeeded\n"); ok(info.exception_info == EXCEPTION_EXECUTE_FAULT, "Access violation type: %08x\n", (unsigned)info.exception_info); } @@ -1052,7 +1052,7 @@ static void test_dpe_exceptions(void) with hardware DEP on */ info.exception_caught = FALSE; run_exception_test(dpe_exception_handler, &info, single_ret, sizeof(single_ret), PAGE_NOACCESS); - ok(info.exception_caught == TRUE, "Execution of disabled memory suceeded\n"); + ok(info.exception_caught == TRUE, "Execution of disabled memory succeeded\n"); ok(info.exception_info == EXCEPTION_READ_FAULT, "Access violation type: %08x\n", (unsigned)info.exception_info); }
1
0
0
0
Huw Davies : oledb32/tests: Fix some failing tests on win98.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 0efdde1f428c51e71fba97824dd4a59149e295af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0efdde1f428c51e71fba97824…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Nov 4 11:23:18 2009 +0000 oledb32/tests: Fix some failing tests on win98. --- dlls/oledb32/tests/convert.c | 89 ++++++++++++++++++++++++----------------- include/oledberr.h | 2 + 2 files changed, 54 insertions(+), 37 deletions(-) diff --git a/dlls/oledb32/tests/convert.c b/dlls/oledb32/tests/convert.c index 07b2d84..1f7ca08 100644 --- a/dlls/oledb32/tests/convert.c +++ b/dlls/oledb32/tests/convert.c @@ -555,26 +555,31 @@ todo_wine dst = 0x1234; ((LARGE_INTEGER*)src)->QuadPart = 0x1234abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == DB_E_ERRORSOCCURRED, "got %08x\n", hr); - ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %d\n", dst_len); - ok(dst == 0x1234, "got %08x\n", dst); - - dst = 0x1234; - ((LARGE_INTEGER*)src)->QuadPart = 0x4321; - hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %d\n", dst_len); - ok(dst == 0x4321, "got %08x\n", dst); - - dst = 0x1234; - ((ULARGE_INTEGER*)src)->QuadPart = 0x4321; - hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %d\n", dst_len); - ok(dst == 0x4321, "got %08x\n", dst); + ok(hr == DB_E_ERRORSOCCURRED || + broken(hr == DB_E_UNSUPPORTEDCONVERSION), /* win98 */ + "got %08x\n", hr); + if(hr != DB_E_UNSUPPORTEDCONVERSION) /* win98 doesn't support I8/UI8 */ + { + ok(dst_status == DBSTATUS_E_DATAOVERFLOW, "got %08x\n", dst_status); + ok(dst_len == sizeof(dst), "got %d\n", dst_len); + ok(dst == 0x1234, "got %08x\n", dst); + + dst = 0x1234; + ((LARGE_INTEGER*)src)->QuadPart = 0x4321; + hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(dst), "got %d\n", dst_len); + ok(dst == 0x4321, "got %08x\n", dst); + + dst = 0x1234; + ((ULARGE_INTEGER*)src)->QuadPart = 0x4321; + hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I2, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(dst), "got %d\n", dst_len); + ok(dst == 0x4321, "got %08x\n", dst); + } dst = 0x1234; strcpy((char *)src, "10"); @@ -798,18 +803,23 @@ todo_wine i4 = 0x12345678; ((LARGE_INTEGER*)src)->QuadPart = 0x1234abcd; hr = IDataConvert_DataConvert(convert, DBTYPE_I8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %d\n", dst_len); - ok(i4 == 0x1234abcd, "got %08x\n", i4); - - i4 = 0x12345678; - ((ULARGE_INTEGER*)src)->QuadPart = 0x1234abcd; - hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(i4), "got %d\n", dst_len); - ok(i4 == 0x1234abcd, "got %08x\n", i4); + ok(hr == S_OK || + broken(hr == DB_E_UNSUPPORTEDCONVERSION), /* win98 */ + "got %08x\n", hr); + if(hr != DB_E_UNSUPPORTEDCONVERSION) /* win98 doesn't support I8/UI8 */ + { + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(i4), "got %d\n", dst_len); + ok(i4 == 0x1234abcd, "got %08x\n", i4); + + i4 = 0x12345678; + ((ULARGE_INTEGER*)src)->QuadPart = 0x1234abcd; + hr = IDataConvert_DataConvert(convert, DBTYPE_UI8, DBTYPE_I4, 0, &dst_len, src, &i4, sizeof(i4), 0, &dst_status, 0, 0, 0); + ok(hr == S_OK, "got %08x\n", hr); + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(i4), "got %d\n", dst_len); + ok(i4 == 0x1234abcd, "got %08x\n", i4); + } i4 = 0x12345678; strcpy((char *)src, "10"); @@ -1174,11 +1184,16 @@ static void test_converttofiletime(void) ((FILETIME *)src)->dwLowDateTime = 0x12345678; ((FILETIME *)src)->dwHighDateTime = 0x9abcdef0; hr = IDataConvert_DataConvert(convert, DBTYPE_FILETIME, DBTYPE_FILETIME, 0, &dst_len, src, &dst, sizeof(dst), 0, &dst_status, 0, 0, 0); - ok(hr == S_OK, "got %08x\n", hr); - ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); - ok(dst_len == sizeof(dst), "got %d\n", dst_len); - ok(dst.dwLowDateTime == 0x12345678, "got %08x\n", dst.dwLowDateTime); - ok(dst.dwHighDateTime == 0x9abcdef0, "got %08x\n", dst.dwHighDateTime); + ok(hr == S_OK || + broken(hr == DB_E_BADBINDINFO), /* win98 */ + "got %08x\n", hr); + if(SUCCEEDED(hr)) + { + ok(dst_status == DBSTATUS_S_OK, "got %08x\n", dst_status); + ok(dst_len == sizeof(dst), "got %d\n", dst_len); + ok(dst.dwLowDateTime == 0x12345678, "got %08x\n", dst.dwLowDateTime); + ok(dst.dwHighDateTime == 0x9abcdef0, "got %08x\n", dst.dwHighDateTime); + } IDataConvert_Release(convert); } diff --git a/include/oledberr.h b/include/oledberr.h index b534531..e25e40e 100644 --- a/include/oledberr.h +++ b/include/oledberr.h @@ -21,6 +21,8 @@ #ifndef __WINE_OLEDBERR_H #define __WINE_OLEDBERR_H +#define DB_E_BADBINDINFO 0x80040e08 + #define DB_E_NOTFOUND 0x80040e19 #define DB_E_UNSUPPORTEDCONVERSION 0x80040e1d
1
0
0
0
Juan Lang : crypt32: Eliminate a double free in the tests.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: f8376b91da0b4fb973dec29c603a06c405d8d1d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f8376b91da0b4fb973dec29c6…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Tue Nov 3 17:22:10 2009 -0800 crypt32: Eliminate a double free in the tests. --- dlls/crypt32/tests/store.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 419d2dd..5c019fa 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -2096,7 +2096,6 @@ static void test_I_UpdateStore(void) certs = countCertsInStore(store1); ok(certs == 0, "Expected 0 certs, got %d\n", certs); - CertFreeCertificateContext(cert); CertCloseStore(store1, 0); CertCloseStore(store2, 0); }
1
0
0
0
Juan Lang : crypt32: Rename a function to reflect its behavior better, and return whether it succeeds.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 108f30bb7d4f466722f7af1fa8c9c9bcfb8e3a5b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=108f30bb7d4f466722f7af1fa…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Oct 30 19:06:44 2009 -0700 crypt32: Rename a function to reflect its behavior better, and return whether it succeeds. --- dlls/crypt32/context.c | 13 ++++++++++--- dlls/crypt32/crypt32_private.h | 6 +++++- dlls/crypt32/store.c | 24 ++++++++++++++++++------ dlls/crypt32/tests/store.c | 1 - 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index 73e1e0e..bf4ccf3 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -313,14 +313,21 @@ void *ContextList_Enum(struct ContextList *list, void *pPrev) return ret; } -void ContextList_Delete(struct ContextList *list, void *context) +BOOL ContextList_Remove(struct ContextList *list, void *context) { struct list *entry = ContextList_ContextToEntry(list, context); + BOOL inList = FALSE; EnterCriticalSection(&list->cs); - list_remove(entry); + if (!list_empty(entry)) + { + list_remove(entry); + inList = TRUE; + } LeaveCriticalSection(&list->cs); - list_init(entry); + if (inList) + list_init(entry); + return inList; } static void ContextList_Empty(struct ContextList *list) diff --git a/dlls/crypt32/crypt32_private.h b/dlls/crypt32/crypt32_private.h index dd96e0f..cbdf511 100644 --- a/dlls/crypt32/crypt32_private.h +++ b/dlls/crypt32/crypt32_private.h @@ -388,7 +388,11 @@ void *ContextList_Add(struct ContextList *list, void *toLink, void *toReplace); void *ContextList_Enum(struct ContextList *list, void *pPrev); -void ContextList_Delete(struct ContextList *list, void *context); +/* Removes a context from the list. Returns TRUE if the context was removed, + * or FALSE if not. (The context may have been duplicated, so subsequent + * removes have no effect.) + */ +BOOL ContextList_Remove(struct ContextList *list, void *context); void ContextList_Free(struct ContextList *list); diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index deb0520..e1cce40 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -184,9 +184,13 @@ static void *CRYPT_MemEnumCert(PWINECRYPT_CERTSTORE store, void *pPrev) static BOOL CRYPT_MemDeleteCert(PWINECRYPT_CERTSTORE store, void *pCertContext) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; + BOOL ret; - ContextList_Delete(ms->certs, pCertContext); - return CertFreeCertificateContext(pCertContext); + if (ContextList_Remove(ms->certs, pCertContext)) + ret = CertFreeCertificateContext(pCertContext); + else + ret = TRUE; + return ret; } static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl, @@ -225,9 +229,13 @@ static void *CRYPT_MemEnumCrl(PWINECRYPT_CERTSTORE store, void *pPrev) static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; + BOOL ret; - ContextList_Delete(ms->crls, pCrlContext); - return CertFreeCRLContext(pCrlContext); + if (ContextList_Remove(ms->crls, pCrlContext)) + ret = CertFreeCRLContext(pCrlContext); + else + ret = TRUE; + return ret; } static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl, @@ -266,9 +274,13 @@ static void *CRYPT_MemEnumCtl(PWINECRYPT_CERTSTORE store, void *pPrev) static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext) { WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; + BOOL ret; - ContextList_Delete(ms->ctls, pCtlContext); - return CertFreeCTLContext(pCtlContext); + if (ContextList_Remove(ms->ctls, pCtlContext)) + ret = CertFreeCTLContext(pCtlContext); + else + ret = TRUE; + return ret; } static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 1f6609c..419d2dd 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -237,7 +237,6 @@ static void testMemStore(void) GetLastError()); /* try deleting a copy */ ret = CertDeleteCertificateFromStore(copy); - todo_wine ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", GetLastError()); /* check that the store is empty */
1
0
0
0
Juan Lang : crypt32: Release contexts when removing them from the mem store .
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: 7e1cff1c18b59d98764d99ac785151212e4824d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e1cff1c18b59d98764d99ac7…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Oct 30 18:48:22 2009 -0700 crypt32: Release contexts when removing them from the mem store. --- dlls/crypt32/store.c | 6 +++--- dlls/crypt32/tests/store.c | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index a529ac6..deb0520 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -186,7 +186,7 @@ static BOOL CRYPT_MemDeleteCert(PWINECRYPT_CERTSTORE store, void *pCertContext) WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; ContextList_Delete(ms->certs, pCertContext); - return TRUE; + return CertFreeCertificateContext(pCertContext); } static BOOL CRYPT_MemAddCrl(PWINECRYPT_CERTSTORE store, void *crl, @@ -227,7 +227,7 @@ static BOOL CRYPT_MemDeleteCrl(PWINECRYPT_CERTSTORE store, void *pCrlContext) WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; ContextList_Delete(ms->crls, pCrlContext); - return TRUE; + return CertFreeCRLContext(pCrlContext); } static BOOL CRYPT_MemAddCtl(PWINECRYPT_CERTSTORE store, void *ctl, @@ -268,7 +268,7 @@ static BOOL CRYPT_MemDeleteCtl(PWINECRYPT_CERTSTORE store, void *pCtlContext) WINE_MEMSTORE *ms = (WINE_MEMSTORE *)store; ContextList_Delete(ms->ctls, pCtlContext); - return TRUE; + return CertFreeCTLContext(pCtlContext); } static void WINAPI CRYPT_MemCloseStore(HCERTSTORE hCertStore, DWORD dwFlags) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 419d2dd..1f6609c 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -237,6 +237,7 @@ static void testMemStore(void) GetLastError()); /* try deleting a copy */ ret = CertDeleteCertificateFromStore(copy); + todo_wine ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", GetLastError()); /* check that the store is empty */
1
0
0
0
Juan Lang : crypt32: Don't delete a context when removing it from a list.
by Alexandre Julliard
04 Nov '09
04 Nov '09
Module: wine Branch: master Commit: df39bbba4f0317aeed8860761067407af11a5c07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=df39bbba4f0317aeed8860761…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Oct 30 18:19:39 2009 -0700 crypt32: Don't delete a context when removing it from a list. --- dlls/crypt32/context.c | 1 - dlls/crypt32/tests/store.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/context.c b/dlls/crypt32/context.c index e0c1932..73e1e0e 100644 --- a/dlls/crypt32/context.c +++ b/dlls/crypt32/context.c @@ -321,7 +321,6 @@ void ContextList_Delete(struct ContextList *list, void *context) list_remove(entry); LeaveCriticalSection(&list->cs); list_init(entry); - list->contextInterface->free(context); } static void ContextList_Empty(struct ContextList *list) diff --git a/dlls/crypt32/tests/store.c b/dlls/crypt32/tests/store.c index 1f6609c..419d2dd 100644 --- a/dlls/crypt32/tests/store.c +++ b/dlls/crypt32/tests/store.c @@ -237,7 +237,6 @@ static void testMemStore(void) GetLastError()); /* try deleting a copy */ ret = CertDeleteCertificateFromStore(copy); - todo_wine ok(ret, "CertDeleteCertificateFromStore failed: %08x\n", GetLastError()); /* check that the store is empty */
1
0
0
0
← Newer
1
...
77
78
79
80
81
82
83
...
91
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
88
89
90
91
Results per page:
10
25
50
100
200