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
July 2007
----- 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
957 discussions
Start a n
N
ew thread
James Hawkins : msi: Fix compilation in MSVC.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 6c940b9b49c7d2755b85c0fe265ec30aec1cf9a2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6c940b9b49c7d2755b85c0fe2…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Jul 12 20:06:11 2007 -0700 msi: Fix compilation in MSVC. --- dlls/msi/tests/source.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index e67bae8..cd9d1c6 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -18,6 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define _WIN32_MSI 300 + #include <stdio.h> #include <windows.h>
1
0
0
0
James Hawkins : msi: Fix three tests that were failing in Windows.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: ed281b725aeaab3df51e8f6b438758878248b6f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ed281b725aeaab3df51e8f6b4…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Jul 12 20:05:02 2007 -0700 msi: Fix three tests that were failing in Windows. --- dlls/msi/tests/install.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 341f02d..19cf266 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -1879,7 +1879,7 @@ static void test_publish(void) state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); todo_wine { - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); } r = MsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, @@ -1937,7 +1937,7 @@ static void test_publish(void) state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); todo_wine { - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); } r = MsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, @@ -1995,7 +1995,7 @@ static void test_publish(void) state = MsiQueryFeatureState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}", "montecristo"); todo_wine { - ok(state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state); + ok(state == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", state); } r = MsiQueryComponentStateA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED,
1
0
0
0
James Hawkins : msi: Fix automation.c compile for MSVC.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: c7b53d37e15487ca7cd1fe141f4bcbde36c7c846 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7b53d37e15487ca7cd1fe141…
Author: James Hawkins <truiken(a)gmail.com> Date: Thu Jul 12 20:04:19 2007 -0700 msi: Fix automation.c compile for MSVC. --- dlls/msi/tests/automation.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/msi/tests/automation.c b/dlls/msi/tests/automation.c index 0189062..e7d1847 100644 --- a/dlls/msi/tests/automation.c +++ b/dlls/msi/tests/automation.c @@ -37,6 +37,8 @@ static const WCHAR szMSITEST[] = { 'M','S','I','T','E','S','T',0 }; static const WCHAR szProductCode[] = { '{','F','1','C','3','A','F','5','0','-','8','B','5','6','-','4','A','6','9','-','A','0','0','C','-','0','0','7','7','3','F','E','4','2','F','3','0','}',0 }; static const WCHAR szUpgradeCode[] = { '{','C','E','0','6','7','E','8','D','-','2','E','1','A','-','4','3','6','7','-','B','7','3','4','-','4','E','B','2','B','D','A','D','6','5','6','5','}',0 }; static const WCHAR szProductInfoException[] = { 'P','r','o','d','u','c','t','I','n','f','o',',','P','r','o','d','u','c','t',',','A','t','t','r','i','b','u','t','e',0 }; +static const WCHAR WINE_INSTALLPROPERTY_PACKAGENAMEW[] = {'P','a','c','k','a','g','e','N','a','m','e',0}; +static const WCHAR WINE_INSTALLPROPERTY_PRODUCTNAMEW[] = {'P','r','o','d','u','c','t','N','a','m','e',0}; static FILETIME systemtime; static CHAR CURR_DIR[MAX_PATH]; static EXCEPINFO excepinfo; @@ -2128,13 +2130,13 @@ static void test_Installer_InstallProduct(LPCWSTR szPath) /* Package name */ memset(szString, 0, sizeof(szString)); - hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PACKAGENAMEW, szString); + hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szString); todo_wine ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); todo_wine ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMsifile); /* Product name */ memset(szString, 0, sizeof(szString)); - hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PRODUCTNAMEW, szString); + hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PRODUCTNAMEW, szString); ok(hr == S_OK, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); ok_w2("Installer_ProductInfo returned %s but expected %s\n", szString, szMSITEST); @@ -2341,7 +2343,7 @@ static void test_Installer(void) /* Package name */ memset(szPath, 0, sizeof(szPath)); - hr = Installer_ProductInfo(szProductCode, INSTALLPROPERTY_PACKAGENAMEW, szPath); + hr = Installer_ProductInfo(szProductCode, WINE_INSTALLPROPERTY_PACKAGENAMEW, szPath); ok(hr == DISP_E_EXCEPTION, "Installer_ProductInfo failed, hresult 0x%08x\n", hr); ok_exception(hr, szProductInfoException);
1
0
0
0
Juan Lang : crypt32: Update comments about hash message version numbers.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: d1bd2ea907bb8d80b324794715416447d4dccff3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d1bd2ea907bb8d80b32479471…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 15:06:21 2007 -0700 crypt32: Update comments about hash message version numbers. --- dlls/crypt32/msg.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index d8ab55a..e97aa0c 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -348,7 +348,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData, if (ret) { CRYPT_ALGORITHM_IDENTIFIER algoId = { 0 }; - DWORD version = 0; /* FIXME */ + DWORD version = CMSG_HASHED_DATA_PKCS_1_5_VERSION; struct AsnEncodeSequenceItem items[7] = { { 0 } }; DWORD cItem = 0; CRYPT_DATA_BLOB hash = { 0, NULL }; @@ -455,9 +455,11 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, SetLastError(CRYPT_E_MSG_ERROR); else { - /* FIXME: under what circumstances is this CMSG_HASHED_DATA_V2? */ DWORD version = CMSG_HASHED_DATA_PKCS_1_5_VERSION; + /* Since the data are always encoded as octets, the version is + * always 0 (see rfc3852, section 7) + */ ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&version, sizeof(version)); }
1
0
0
0
Juan Lang : crypt32: Introduce an updated state, and use it to remove boolean "begun".
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: a8e135f4c6b39ea6e0c4cee846815fb23333eeec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a8e135f4c6b39ea6e0c4cee84…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 15:05:45 2007 -0700 crypt32: Introduce an updated state, and use it to remove boolean "begun". --- dlls/crypt32/msg.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 001e128..d8ab55a 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -40,6 +40,7 @@ typedef BOOL (*CryptMsgUpdateFunc)(HCRYPTMSG hCryptMsg, const BYTE *pbData, typedef enum _CryptMsgState { MsgStateInit, + MsgStateUpdated, MsgStateFinalized } CryptMsgState; @@ -82,7 +83,6 @@ typedef struct _CDataEncodeMsg CryptMsgBase base; DWORD bare_content_len; LPBYTE bare_content; - BOOL begun; } CDataEncodeMsg; static const BYTE empty_data_content[] = { 0x04,0x00 }; @@ -170,11 +170,10 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, { __TRY { - if (!msg->begun) + if (msg->base.state != MsgStateUpdated) { CRYPT_DATA_BLOB header; - msg->begun = TRUE; ret = CRYPT_EncodeDataContentInfoHeader(msg, &header); if (ret) { @@ -316,7 +315,6 @@ static HCRYPTMSG CDataEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo, CDataEncodeMsg_Close, CDataEncodeMsg_GetParam, CDataEncodeMsg_Update); msg->bare_content_len = sizeof(empty_data_content); msg->bare_content = (LPBYTE)empty_data_content; - msg->begun = FALSE; } return (HCRYPTMSG)msg; } @@ -327,7 +325,6 @@ typedef struct _CHashEncodeMsg HCRYPTPROV prov; HCRYPTHASH hash; CRYPT_DATA_BLOB data; - BOOL begun; } CHashEncodeMsg; static void CHashEncodeMsg_Close(HCRYPTMSG hCryptMsg) @@ -367,7 +364,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData, items[cItem].encodeFunc = CRYPT_AsnEncodeAlgorithmIdWithNullParams; cItem++; /* Quirk: OID is only encoded messages if an update has happened */ - if (msg->begun) + if (msg->base.state != MsgStateInit) contentInfo.pszObjId = oid_rsa_data; if (!(msg->base.open_flags & CMSG_DETACHED_FLAG) && msg->data.cbData) { @@ -479,7 +476,6 @@ static BOOL CHashEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal); - msg->begun = TRUE; if (msg->base.streamed || (msg->base.open_flags & CMSG_DETACHED_FLAG)) { /* Doesn't do much, as stream output is never called, and you @@ -544,7 +540,6 @@ static HCRYPTMSG CHashEncodeMsg_Open(DWORD dwFlags, const void *pvMsgEncodeInfo, msg->prov = prov; msg->data.cbData = 0; msg->data.pbData = NULL; - msg->begun = FALSE; if (!CryptCreateHash(prov, algID, 0, 0, &msg->hash)) { CryptMsgClose(msg); @@ -718,6 +713,7 @@ BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData, else { ret = msg->update(hCryptMsg, pbData, cbData, fFinal); + msg->state = MsgStateUpdated; if (fFinal) msg->state = MsgStateFinalized; }
1
0
0
0
Juan Lang : crypt32: Change finalized from a boolean to a state and use it to simplify message updating .
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 09c4faf159c1a6897926ea559f687aa552b26d46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=09c4faf159c1a6897926ea559…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 15:05:02 2007 -0700 crypt32: Change finalized from a boolean to a state and use it to simplify message updating. --- dlls/crypt32/msg.c | 76 +++++++++++++++++++++++---------------------- dlls/crypt32/tests/msg.c | 1 - 2 files changed, 39 insertions(+), 38 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 4c495de..001e128 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -38,13 +38,18 @@ typedef BOOL (*CryptMsgGetParamFunc)(HCRYPTMSG hCryptMsg, DWORD dwParamType, typedef BOOL (*CryptMsgUpdateFunc)(HCRYPTMSG hCryptMsg, const BYTE *pbData, DWORD cbData, BOOL fFinal); +typedef enum _CryptMsgState { + MsgStateInit, + MsgStateFinalized +} CryptMsgState; + typedef struct _CryptMsgBase { LONG ref; DWORD open_flags; BOOL streamed; CMSG_STREAM_INFO stream_info; - BOOL finalized; + CryptMsgState state; CryptMsgCloseFunc close; CryptMsgUpdateFunc update; CryptMsgGetParamFunc get_param; @@ -69,7 +74,7 @@ static inline void CryptMsgBase_Init(CryptMsgBase *msg, DWORD dwFlags, msg->close = close; msg->get_param = get_param; msg->update = update; - msg->finalized = FALSE; + msg->state = MsgStateInit; } typedef struct _CDataEncodeMsg @@ -161,12 +166,8 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, CDataEncodeMsg *msg = (CDataEncodeMsg *)hCryptMsg; BOOL ret = FALSE; - if (msg->base.finalized) - SetLastError(CRYPT_E_MSG_ERROR); - else if (msg->base.streamed) + if (msg->base.streamed) { - if (fFinal) - msg->base.finalized = TRUE; __TRY { if (!msg->begun) @@ -223,7 +224,6 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, } else { - msg->base.finalized = TRUE; if (!cbData) SetLastError(E_INVALIDARG); else @@ -380,7 +380,7 @@ static BOOL CRYPT_EncodePKCSDigestedData(CHashEncodeMsg *msg, void *pvData, items[cItem].encodeFunc = CRYPT_AsnEncodePKCSContentInfoInternal; cItem++; - if (msg->base.finalized) + if (msg->base.state == MsgStateFinalized) { size = sizeof(DWORD); ret = CryptGetHashParam(msg->hash, HP_HASHSIZE, @@ -454,7 +454,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, 0); break; case CMSG_VERSION_PARAM: - if (!msg->base.finalized) + if (msg->base.state != MsgStateFinalized) SetLastError(CRYPT_E_MSG_ERROR); else { @@ -479,39 +479,31 @@ static BOOL CHashEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal); - if (msg->base.finalized) - SetLastError(CRYPT_E_MSG_ERROR); + msg->begun = TRUE; + if (msg->base.streamed || (msg->base.open_flags & CMSG_DETACHED_FLAG)) + { + /* Doesn't do much, as stream output is never called, and you + * can't get the content. + */ + ret = CryptHashData(msg->hash, pbData, cbData, 0); + } else { - msg->begun = TRUE; - if (fFinal) - msg->base.finalized = TRUE; - if (msg->base.streamed || (msg->base.open_flags & CMSG_DETACHED_FLAG)) - { - /* Doesn't do much, as stream output is never called, and you - * can't get the content. - */ - ret = CryptHashData(msg->hash, pbData, cbData, 0); - } + if (!fFinal) + SetLastError(CRYPT_E_MSG_ERROR); else { - if (!fFinal) - SetLastError(CRYPT_E_MSG_ERROR); - else + ret = CryptHashData(msg->hash, pbData, cbData, 0); + if (ret) { - ret = CryptHashData(msg->hash, pbData, cbData, 0); - if (ret) + msg->data.pbData = CryptMemAlloc(cbData); + if (msg->data.pbData) { - msg->data.pbData = CryptMemAlloc(cbData); - if (msg->data.pbData) - { - memcpy(msg->data.pbData + msg->data.cbData, pbData, - cbData); - msg->data.cbData += cbData; - } - else - ret = FALSE; + memcpy(msg->data.pbData + msg->data.cbData, pbData, cbData); + msg->data.cbData += cbData; } + else + ret = FALSE; } } } @@ -717,9 +709,19 @@ BOOL WINAPI CryptMsgUpdate(HCRYPTMSG hCryptMsg, const BYTE *pbData, DWORD cbData, BOOL fFinal) { CryptMsgBase *msg = (CryptMsgBase *)hCryptMsg; + BOOL ret = FALSE; TRACE("(%p, %p, %d, %d)\n", hCryptMsg, pbData, cbData, fFinal); - return msg->update(hCryptMsg, pbData, cbData, fFinal); + + if (msg->state == MsgStateFinalized) + SetLastError(CRYPT_E_MSG_ERROR); + else + { + ret = msg->update(hCryptMsg, pbData, cbData, fFinal); + if (fFinal) + msg->state = MsgStateFinalized; + } + return ret; } BOOL WINAPI CryptMsgGetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 688ae83..a41a310 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -994,7 +994,6 @@ static void test_decode_msg_update(void) /* Can't update after a final update */ SetLastError(0xdeadbeef); ret = CryptMsgUpdate(msg, dataEmptyContent, sizeof(dataEmptyContent), TRUE); - todo_wine ok(!ret && GetLastError() == CRYPT_E_MSG_ERROR, "Expected CRYPT_E_MSG_ERROR, got %x\n", GetLastError()); CryptMsgClose(msg);
1
0
0
0
Juan Lang : crypt32: Relax a test, the specific error isn't so important.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 9bdb084eb6945d349fcde825629c7a67ea18b9af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9bdb084eb6945d349fcde8256…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 15:00:04 2007 -0700 crypt32: Relax a test, the specific error isn't so important. --- dlls/crypt32/tests/msg.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 5831d7b..688ae83 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -795,9 +795,7 @@ static void test_hash_msg_get_param(void) ok(value == 0, "Expected version 0, got %d\n", value); /* As usual, the type isn't available. */ ret = CryptMsgGetParam(msg, CMSG_TYPE_PARAM, 0, NULL, &size); - todo_wine - ok(!ret && GetLastError() == CRYPT_E_INVALID_MSG_TYPE, - "Expected CRYPT_E_INVALID_MSG_TYPE, got %x\n", GetLastError()); + ok(!ret, "Expected failure\n"); CryptMsgClose(msg); msg = CryptMsgOpenToEncode(PKCS_7_ASN_ENCODING, 0, CMSG_HASHED, &hashInfo,
1
0
0
0
Juan Lang : crypt32: Implement retrieving a hashed message's content.
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 8599fd77487c9aa7c4a7fbda244a35fe953efc6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8599fd77487c9aa7c4a7fbda2…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 14:59:27 2007 -0700 crypt32: Implement retrieving a hashed message's content. --- dlls/crypt32/crypt32_private.h | 17 ++++++- dlls/crypt32/encode.c | 68 +++++++++++++-------------- dlls/crypt32/msg.c | 102 +++++++++++++++++++++++++++++++++++++++- dlls/crypt32/tests/msg.c | 20 -------- 4 files changed, 150 insertions(+), 57 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=8599fd77487c9aa7c4a7f…
1
0
0
0
Juan Lang : crypt32: Introduce an algorithm id encoding function that encodes missing parameters as NULL
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 678fb8ac14b3062a3221247f66075c5ca02862de URL:
http://source.winehq.org/git/wine.git/?a=commit;h=678fb8ac14b3062a3221247f6…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 14:58:08 2007 -0700 crypt32: Introduce an algorithm id encoding function that encodes missing parameters as NULL and use it to match native encoding (and simplify PKCS signer tests). --- dlls/crypt32/encode.c | 37 ++++++++++++++++++++++++--- dlls/crypt32/tests/encode.c | 59 ++++-------------------------------------- 2 files changed, 39 insertions(+), 57 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=678fb8ac14b3062a32212…
1
0
0
0
Juan Lang : crypt32: Add tests for retrieving the content of a non-finalized (detached) message .
by Alexandre Julliard
13 Jul '07
13 Jul '07
Module: wine Branch: master Commit: 880507d9069365317a2b7fc7435e8907b3af911f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=880507d9069365317a2b7fc74…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Jul 12 14:57:20 2007 -0700 crypt32: Add tests for retrieving the content of a non-finalized (detached) message. --- dlls/crypt32/tests/msg.c | 26 +++++++++++++++++++++++++- 1 files changed, 25 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 03028e4..e1fcd7a 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -853,6 +853,15 @@ static const BYTE hashContent[] = { 0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0, 0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f }; +static const BYTE detachedHashNonFinalBareContent[] = { +0x30,0x20,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, +0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, +0x07,0x01,0x04,0x00 }; +static const BYTE detachedHashNonFinalContent[] = { +0x30,0x2f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x22, +0x30,0x20,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, +0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, +0x07,0x01,0x04,0x00 }; static const BYTE detachedHashBareContent[] = { 0x30,0x30,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d, 0x02,0x05,0x05,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01, @@ -920,9 +929,24 @@ static void test_hash_msg_encoding(void) check_param("detached hash empty content", msg, CMSG_CONTENT_PARAM, hashEmptyContent, sizeof(hashEmptyContent)); } - ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), TRUE); + ret = CryptMsgUpdate(msg, msgData, sizeof(msgData), FALSE); ok(ret, "CryptMsgUpdate failed: %x\n", GetLastError()); todo_wine { + check_param("detached hash not final bare content", msg, + CMSG_BARE_CONTENT_PARAM, detachedHashNonFinalBareContent, + sizeof(detachedHashNonFinalBareContent)); + check_param("detached hash not final content", msg, CMSG_CONTENT_PARAM, + detachedHashNonFinalContent, sizeof(detachedHashNonFinalContent)); + } + ret = CryptMsgUpdate(msg, NULL, 0, TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + todo_wine { + check_param("detached hash bare content", msg, CMSG_BARE_CONTENT_PARAM, + detachedHashBareContent, sizeof(detachedHashBareContent)); + check_param("detached hash content", msg, CMSG_CONTENT_PARAM, + detachedHashContent, sizeof(detachedHashContent)); + } + todo_wine { check_param("detached hash bare content", msg, CMSG_BARE_CONTENT_PARAM, detachedHashBareContent, sizeof(detachedHashBareContent)); check_param("detached hash content", msg, CMSG_CONTENT_PARAM,
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
96
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
92
93
94
95
96
Results per page:
10
25
50
100
200