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
Juan Lang : crypt32: Implement getting some parameters from a decoded signed message.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 115edc67e60308d35c34dd9adeb46ae2f54db39c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=115edc67e60308d35c34dd9ad…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:57:50 2007 -0700 crypt32: Implement getting some parameters from a decoded signed message. --- dlls/crypt32/msg.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/crypt32/tests/msg.c | 12 ------ 2 files changed, 88 insertions(+), 12 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index 042b1ef..bca4040 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1559,6 +1559,90 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, return ret; } +static BOOL CDecodeSignedMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, + DWORD dwIndex, void *pvData, DWORD *pcbData) +{ + BOOL ret = FALSE; + + switch (dwParamType) + { + case CMSG_TYPE_PARAM: + ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type)); + break; + case CMSG_SIGNER_COUNT_PARAM: + if (msg->u.signedInfo) + ret = CRYPT_CopyParam(pvData, pcbData, + &msg->u.signedInfo->cSignerInfo, sizeof(DWORD)); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_CERT_COUNT_PARAM: + if (msg->u.signedInfo) + ret = CRYPT_CopyParam(pvData, pcbData, + &msg->u.signedInfo->cCertEncoded, sizeof(DWORD)); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_CERT_PARAM: + if (msg->u.signedInfo) + { + if (dwIndex >= msg->u.signedInfo->cCertEncoded) + SetLastError(CRYPT_E_INVALID_INDEX); + else + ret = CRYPT_CopyParam(pvData, pcbData, + msg->u.signedInfo->rgCertEncoded[dwIndex].pbData, + msg->u.signedInfo->rgCertEncoded[dwIndex].cbData); + } + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_CRL_COUNT_PARAM: + if (msg->u.signedInfo) + ret = CRYPT_CopyParam(pvData, pcbData, + &msg->u.signedInfo->cCrlEncoded, sizeof(DWORD)); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_CRL_PARAM: + if (msg->u.signedInfo) + { + if (dwIndex >= msg->u.signedInfo->cCrlEncoded) + SetLastError(CRYPT_E_INVALID_INDEX); + else + ret = CRYPT_CopyParam(pvData, pcbData, + msg->u.signedInfo->rgCrlEncoded[dwIndex].pbData, + msg->u.signedInfo->rgCrlEncoded[dwIndex].cbData); + } + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_ATTR_CERT_COUNT_PARAM: + if (msg->u.signedInfo) + ret = CRYPT_CopyParam(pvData, pcbData, + &msg->u.signedInfo->cAttrCertEncoded, sizeof(DWORD)); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + case CMSG_ATTR_CERT_PARAM: + if (msg->u.signedInfo) + { + if (dwIndex >= msg->u.signedInfo->cAttrCertEncoded) + SetLastError(CRYPT_E_INVALID_INDEX); + else + ret = CRYPT_CopyParam(pvData, pcbData, + msg->u.signedInfo->rgAttrCertEncoded[dwIndex].pbData, + msg->u.signedInfo->rgAttrCertEncoded[dwIndex].cbData); + } + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + break; + default: + FIXME("unimplemented for %d\n", dwParamType); + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + } + return ret; +} + static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, DWORD dwIndex, void *pvData, DWORD *pcbData) { @@ -1571,6 +1655,10 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, ret = CDecodeHashMsg_GetParam(msg, dwParamType, dwIndex, pvData, pcbData); break; + case CMSG_SIGNED: + ret = CDecodeSignedMsg_GetParam(msg, dwParamType, dwIndex, pvData, + pcbData); + break; default: switch (dwParamType) { diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index b7f9393..85a9d62 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -1961,26 +1961,18 @@ static void test_decode_msg_get_param(void) size = sizeof(value); value = 2112; ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 1, "Expected 1 signer, got %d\n", value); - } /* index is ignored when getting signer count */ ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 1, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 1, "Expected 1 signer, got %d\n", value); - } ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 0, "Expected 0 certs, got %d\n", value); - } ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 0, "Expected 0 CRLs, got %d\n", value); - } CryptMsgClose(msg); msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, NULL); @@ -1988,17 +1980,13 @@ static void test_decode_msg_get_param(void) sizeof(signedWithCertAndCrlBareContent), TRUE); ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 1, "Expected 1 cert, got %d\n", value); check_param("cert", msg, CMSG_CERT_PARAM, cert, sizeof(cert)); - } ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); - todo_wine { ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); ok(value == 1, "Expected 1 CRL, got %d\n", value); check_param("crl", msg, CMSG_CRL_PARAM, crl, sizeof(crl)); - } CryptMsgClose(msg); }
1
0
0
0
Juan Lang : crypt32: Change type to avoid unnecessary casting.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 9c7c9e545e2518701e045ff9c47397c7a2ba50fd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c7c9e545e2518701e045ff9c…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:57:17 2007 -0700 crypt32: Change type to avoid unnecessary casting. --- dlls/crypt32/msg.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index d1b2ec6..042b1ef 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -241,7 +241,7 @@ static BOOL CDataEncodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, return ret; } -static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const BYTE *src, +static BOOL CRYPT_CopyParam(void *pvData, DWORD *pcbData, const void *src, DWORD len) { BOOL ret = TRUE; @@ -444,8 +444,7 @@ static BOOL CHashEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, /* 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)); + ret = CRYPT_CopyParam(pvData, pcbData, &version, sizeof(version)); } break; default: @@ -887,7 +886,7 @@ static BOOL CSignedEncodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, pvData, pcbData); break; case CMSG_VERSION_PARAM: - ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->info.version, + ret = CRYPT_CopyParam(pvData, pcbData, &msg->info.version, sizeof(msg->info.version)); break; default: @@ -1495,8 +1494,7 @@ static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, switch (dwParamType) { case CMSG_TYPE_PARAM: - ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type, - sizeof(msg->type)); + ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type)); break; case CMSG_HASH_ALGORITHM_PARAM: { @@ -1577,7 +1575,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, switch (dwParamType) { case CMSG_TYPE_PARAM: - ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type, + ret = CRYPT_CopyParam(pvData, pcbData, &msg->type, sizeof(msg->type)); break; default:
1
0
0
0
Juan Lang : crypt32: Test getting parameters from decoded signed messages.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: d187fcd172bb0b5583a93fef7b579cf5b1ce1210 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d187fcd172bb0b5583a93fef7…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:56:48 2007 -0700 crypt32: Test getting parameters from decoded signed messages. --- dlls/crypt32/tests/msg.c | 54 ++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 50 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/tests/msg.c b/dlls/crypt32/tests/msg.c index 8cfb72c..b7f9393 100644 --- a/dlls/crypt32/tests/msg.c +++ b/dlls/crypt32/tests/msg.c @@ -1907,7 +1907,7 @@ static void test_decode_msg_get_param(void) { HCRYPTMSG msg; BOOL ret; - DWORD size = 0, version; + DWORD size = 0, value; LPBYTE buf; msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); @@ -1950,9 +1950,55 @@ static void test_decode_msg_get_param(void) } check_param("hash inner OID", msg, CMSG_INNER_CONTENT_TYPE_PARAM, (const BYTE *)szOID_RSA_data, strlen(szOID_RSA_data) + 1); - version = CMSG_HASHED_DATA_V0; - check_param("hash version", msg, CMSG_VERSION_PARAM, (const BYTE *)&version, - sizeof(version)); + value = CMSG_HASHED_DATA_V0; + check_param("hash version", msg, CMSG_VERSION_PARAM, (const BYTE *)&value, + sizeof(value)); + CryptMsgClose(msg); + + msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, 0, 0, NULL, NULL); + ret = CryptMsgUpdate(msg, signedContent, sizeof(signedContent), TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + size = sizeof(value); + value = 2112; + ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 0, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 1, "Expected 1 signer, got %d\n", value); + } + /* index is ignored when getting signer count */ + ret = CryptMsgGetParam(msg, CMSG_SIGNER_COUNT_PARAM, 1, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 1, "Expected 1 signer, got %d\n", value); + } + ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 0, "Expected 0 certs, got %d\n", value); + } + ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 0, "Expected 0 CRLs, got %d\n", value); + } + CryptMsgClose(msg); + msg = CryptMsgOpenToDecode(PKCS_7_ASN_ENCODING, 0, CMSG_SIGNED, 0, NULL, + NULL); + ret = CryptMsgUpdate(msg, signedWithCertAndCrlBareContent, + sizeof(signedWithCertAndCrlBareContent), TRUE); + ok(ret, "CryptMsgUpdate failed: %08x\n", GetLastError()); + ret = CryptMsgGetParam(msg, CMSG_CERT_COUNT_PARAM, 0, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 1, "Expected 1 cert, got %d\n", value); + check_param("cert", msg, CMSG_CERT_PARAM, cert, sizeof(cert)); + } + ret = CryptMsgGetParam(msg, CMSG_CRL_COUNT_PARAM, 0, &value, &size); + todo_wine { + ok(ret, "CryptMsgGetParam failed: %08x\n", GetLastError()); + ok(value == 1, "Expected 1 CRL, got %d\n", value); + check_param("crl", msg, CMSG_CRL_PARAM, crl, sizeof(crl)); + } CryptMsgClose(msg); }
1
0
0
0
Juan Lang : crypt32: Store decoded signed content in message.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 299612378a9120340ffc8058ddba105bae192a9a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=299612378a9120340ffc8058d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:56:20 2007 -0700 crypt32: Store decoded signed content in message. --- dlls/crypt32/msg.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index ee116bd..d1b2ec6 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1241,6 +1241,7 @@ typedef struct _CDecodeMsg HCRYPTPROV crypt_prov; union { HCRYPTHASH hash; + CRYPT_SIGNED_INFO *signedInfo; } u; CRYPT_DATA_BLOB msg_data; PCONTEXT_PROPERTY_LIST properties; @@ -1257,6 +1258,9 @@ static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg) case CMSG_HASHED: CryptDestroyHash(msg->u.hash); break; + case CMSG_SIGNED: + LocalFree(msg->u.signedInfo); + break; } CryptMemFree(msg->msg_data.pbData); ContextPropertyList_Free(msg->properties); @@ -1390,10 +1394,7 @@ static BOOL CDecodeMsg_DecodeSignedContent(CDecodeMsg *msg, CRYPT_DECODE_ALLOC_FLAG, NULL, (CRYPT_SIGNED_INFO *)&signedInfo, &size); if (ret) - { - FIXME("store properties in message\n"); - LocalFree(signedInfo); - } + msg->u.signedInfo = signedInfo; return ret; } /* Decodes the content in blob as the type given, and updates the value
1
0
0
0
Juan Lang : crypt32: Correct type of a decoded signed message.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 211a8d324f0cdf4e2be1678c5bf8e603be45a2d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=211a8d324f0cdf4e2be1678c5…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:55:44 2007 -0700 crypt32: Correct type of a decoded signed message. --- dlls/crypt32/msg.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index f6cddbb..ee116bd 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1422,7 +1422,7 @@ static BOOL CDecodeMsg_DecodeContent(CDecodeMsg *msg, CRYPT_DER_BLOB *blob, break; case CMSG_SIGNED: if ((ret = CDecodeMsg_DecodeSignedContent(msg, blob))) - msg->type = CMSG_HASHED; + msg->type = CMSG_SIGNED; break; default: {
1
0
0
0
Juan Lang : crypt32: A decoded message' s parameters are dependent on its type.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: fd1e88ae61aa347e45f32e0770536f46f5e93369 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd1e88ae61aa347e45f32e077…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Jul 27 10:55:15 2007 -0700 crypt32: A decoded message's parameters are dependent on its type. --- dlls/crypt32/msg.c | 61 ++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 52 insertions(+), 9 deletions(-) diff --git a/dlls/crypt32/msg.c b/dlls/crypt32/msg.c index d932815..f6cddbb 100644 --- a/dlls/crypt32/msg.c +++ b/dlls/crypt32/msg.c @@ -1239,7 +1239,9 @@ typedef struct _CDecodeMsg CryptMsgBase base; DWORD type; HCRYPTPROV crypt_prov; - HCRYPTHASH hash; + union { + HCRYPTHASH hash; + } u; CRYPT_DATA_BLOB msg_data; PCONTEXT_PROPERTY_LIST properties; } CDecodeMsg; @@ -1250,7 +1252,12 @@ static void CDecodeMsg_Close(HCRYPTMSG hCryptMsg) if (msg->base.open_flags & CMSG_CRYPT_RELEASE_CONTEXT_FLAG) CryptReleaseContext(msg->crypt_prov, 0); - CryptDestroyHash(msg->hash); + switch (msg->type) + { + case CMSG_HASHED: + CryptDestroyHash(msg->u.hash); + break; + } CryptMemFree(msg->msg_data.pbData); ContextPropertyList_Free(msg->properties); } @@ -1479,10 +1486,9 @@ static BOOL CDecodeMsg_Update(HCRYPTMSG hCryptMsg, const BYTE *pbData, return ret; } -static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, +static BOOL CDecodeHashMsg_GetParam(CDecodeMsg *msg, DWORD dwParamType, DWORD dwIndex, void *pvData, DWORD *pcbData) { - CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg; BOOL ret = FALSE; switch (dwParamType) @@ -1508,7 +1514,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, break; } case CMSG_COMPUTED_HASH_PARAM: - if (!msg->hash) + if (!msg->u.hash) { CRYPT_ALGORITHM_IDENTIFIER *hashAlgoID = NULL; DWORD size = 0; @@ -1520,7 +1526,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, hashAlgoID, &size); if (ret) algID = CertOIDToAlgId(hashAlgoID->pszObjId); - ret = CryptCreateHash(msg->crypt_prov, algID, 0, 0, &msg->hash); + ret = CryptCreateHash(msg->crypt_prov, algID, 0, 0, &msg->u.hash); if (ret) { CRYPT_DATA_BLOB content; @@ -1528,7 +1534,7 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, ret = ContextPropertyList_FindProperty(msg->properties, CMSG_CONTENT_PARAM, &content); if (ret) - ret = CryptHashData(msg->hash, content.pbData, + ret = CryptHashData(msg->u.hash, content.pbData, content.cbData, 0); } CryptMemFree(hashAlgoID); @@ -1536,7 +1542,8 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, else ret = TRUE; if (ret) - ret = CryptGetHashParam(msg->hash, HP_HASHVAL, pvData, pcbData, 0); + ret = CryptGetHashParam(msg->u.hash, HP_HASHVAL, pvData, pcbData, + 0); break; default: { @@ -1553,6 +1560,42 @@ static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, return ret; } +static BOOL CDecodeMsg_GetParam(HCRYPTMSG hCryptMsg, DWORD dwParamType, + DWORD dwIndex, void *pvData, DWORD *pcbData) +{ + CDecodeMsg *msg = (CDecodeMsg *)hCryptMsg; + BOOL ret = FALSE; + + switch (msg->type) + { + case CMSG_HASHED: + ret = CDecodeHashMsg_GetParam(msg, dwParamType, dwIndex, pvData, + pcbData); + break; + default: + switch (dwParamType) + { + case CMSG_TYPE_PARAM: + ret = CRYPT_CopyParam(pvData, pcbData, (const BYTE *)&msg->type, + sizeof(msg->type)); + break; + default: + { + CRYPT_DATA_BLOB blob; + + ret = ContextPropertyList_FindProperty(msg->properties, dwParamType, + &blob); + if (ret) + ret = CRYPT_CopyParam(pvData, pcbData, blob.pbData, + blob.cbData); + else + SetLastError(CRYPT_E_INVALID_MSG_TYPE); + } + } + } + return ret; +} + HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags, DWORD dwMsgType, HCRYPTPROV hCryptProv, PCERT_INFO pRecipientInfo, PCMSG_STREAM_INFO pStreamInfo) @@ -1580,7 +1623,7 @@ HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags, msg->crypt_prov = CRYPT_GetDefaultProvider(); msg->base.open_flags &= ~CMSG_CRYPT_RELEASE_CONTEXT_FLAG; } - msg->hash = 0; + memset(&msg->u, 0, sizeof(msg->u)); msg->msg_data.cbData = 0; msg->msg_data.pbData = NULL; msg->properties = ContextPropertyList_Create();
1
0
0
0
Paul Vriens : localspl/tests: Use skip if localspl can't be loaded.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: b893575cb9df15871dd847d3b8ea5b78a879c0bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b893575cb9df15871dd847d3b…
Author: Paul Vriens <paul.vriens.wine(a)gmail.com> Date: Fri Jul 27 21:41:32 2007 +0200 localspl/tests: Use skip if localspl can't be loaded. --- dlls/localspl/tests/localmon.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/localspl/tests/localmon.c b/dlls/localspl/tests/localmon.c index ff358ca..535a76b 100644 --- a/dlls/localspl/tests/localmon.c +++ b/dlls/localspl/tests/localmon.c @@ -1086,7 +1086,10 @@ START_TEST(localmon) /* This DLL does not exist on Win9x */ hdll = LoadLibraryA("localspl.dll"); - if (!hdll) return; + if (!hdll) { + skip("localspl.dll cannot be loaded, most likely running on Win9x\n"); + return; + } tempdirW[0] = '\0'; tempfileW[0] = '\0';
1
0
0
0
James Hawkins : msi: Use a more unique property separator.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 9089835c3552d70b1f54901d7e500814a209a9d3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9089835c3552d70b1f54901d7…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Jul 27 11:13:01 2007 -0700 msi: Use a more unique property separator. --- dlls/msi/custom.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c index 54efc85..390113e 100644 --- a/dlls/msi/custom.c +++ b/dlls/msi/custom.c @@ -137,7 +137,7 @@ static BOOL check_execution_scheduling_options(MSIPACKAGE *package, LPCWSTR acti /* stores the following properties before the action: * - * [CustomActionData][UserSID][ProductCode]Action + * [CustomActionData<=>UserSID<=>ProductCode]Action */ static LPWSTR msi_get_deferred_action(LPCWSTR action, LPCWSTR actiondata, LPCWSTR usersid, LPCWSTR prodcode) @@ -145,7 +145,9 @@ static LPWSTR msi_get_deferred_action(LPCWSTR action, LPCWSTR actiondata, LPWSTR deferred; DWORD len; - static const WCHAR format[] = {'[','%','s',']','[','%','s',']','[','%','s',']','%','s',0}; + static const WCHAR format[] = { + '[','%','s','<','=','>','%','s','<','=','>','%','s',']','%','s',0 + }; if (!actiondata) return strdupW(action); @@ -162,15 +164,17 @@ static void set_deferred_action_props(MSIPACKAGE *package, LPWSTR deferred_data) { LPWSTR end, beg = deferred_data + 1; - end = strchrW(beg, ']'); + static const WCHAR sep[] = {'<','=','>',0}; + + end = strstrW(beg, sep); *end = '\0'; MSI_SetPropertyW(package, szActionData, beg); - beg = end + 2; + beg = end + 3; - end = strchrW(beg, ']'); + end = strstrW(beg, sep); *end = '\0'; MSI_SetPropertyW(package, UserSID, beg); - beg = end + 2; + beg = end + 3; end = strchrW(beg, ']'); *end = '\0';
1
0
0
0
James Hawkins : msi: Keep track of the wildcard record index.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: ac1f717ab8789cb1288252009aac8821cbcd5918 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ac1f717ab8789cb1288252009…
Author: James Hawkins <truiken(a)gmail.com> Date: Fri Jul 27 11:11:54 2007 -0700 msi: Keep track of the wildcard record index. --- dlls/msi/tests/db.c | 53 ++++++++++++-------------------------------------- dlls/msi/where.c | 42 ++++++++++++++++++++++------------------ 2 files changed, 36 insertions(+), 59 deletions(-) diff --git a/dlls/msi/tests/db.c b/dlls/msi/tests/db.c index 39ef6ac..3e38f20 100644 --- a/dlls/msi/tests/db.c +++ b/dlls/msi/tests/db.c @@ -3703,68 +3703,41 @@ static void test_select_markers(void) ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); r = MsiViewExecute(view, rec); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); r = MsiViewFetch(view, &res); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); size = MAX_PATH; r = MsiRecordGetString(res, 1, buf, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmp(buf, "apple"), "Expected apple, got %s\n", buf); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmp(buf, "apple"), "Expected apple, got %s\n", buf); size = MAX_PATH; r = MsiRecordGetString(res, 2, buf, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmp(buf, "two"), "Expected two, got %s\n", buf); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmp(buf, "two"), "Expected two, got %s\n", buf); r = MsiRecordGetInteger(res, 3); - todo_wine - { - ok(r == 1, "Expected 1, got %d\n", r); - } + ok(r == 1, "Expected 1, got %d\n", r); MsiCloseHandle(res); r = MsiViewFetch(view, &res); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); size = MAX_PATH; r = MsiRecordGetString(res, 1, buf, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmp(buf, "apple"), "Expected apple, got %s\n", buf); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmp(buf, "apple"), "Expected apple, got %s\n", buf); size = MAX_PATH; r = MsiRecordGetString(res, 2, buf, &size); - todo_wine - { - ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); - ok(!lstrcmp(buf, "two"), "Expected two, got %s\n", buf); - } + ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); + ok(!lstrcmp(buf, "two"), "Expected two, got %s\n", buf); r = MsiRecordGetInteger(res, 3); - todo_wine - { - ok(r == 2, "Expected 2, got %d\n", r); - } + ok(r == 2, "Expected 2, got %d\n", r); MsiCloseHandle(res); diff --git a/dlls/msi/where.c b/dlls/msi/where.c index c6a1181..5104e67 100644 --- a/dlls/msi/where.c +++ b/dlls/msi/where.c @@ -46,6 +46,7 @@ typedef struct tagMSIWHEREVIEW UINT row_count; UINT *reorder; struct expr *cond; + UINT rec_index; } MSIWHEREVIEW; static UINT WHERE_fetch_int( struct tagMSIVIEW *view, UINT row, UINT col, UINT *val ) @@ -156,24 +157,25 @@ static INT INT_evaluate_unary( INT lval, UINT op ) return 0; } -static const WCHAR *STRING_evaluate( const string_table *st, - MSIVIEW *table, UINT row, const struct expr *expr, const MSIRECORD *record ) +static const WCHAR *STRING_evaluate( MSIWHEREVIEW *wv, UINT row, + const struct expr *expr, + const MSIRECORD *record ) { UINT val = 0, r; switch( expr->type ) { case EXPR_COL_NUMBER_STRING: - r = table->ops->fetch_int( table, row, expr->u.col_number, &val ); + r = wv->table->ops->fetch_int( wv->table, row, expr->u.col_number, &val ); if( r != ERROR_SUCCESS ) return NULL; - return msi_string_lookup_id( st, val ); + return msi_string_lookup_id( wv->db->strings, val ); case EXPR_SVAL: return expr->u.sval; case EXPR_WILDCARD: - return MSI_RecordGetString( record, 1 ); + return MSI_RecordGetString( record, ++wv->rec_index ); default: ERR("Invalid expression type\n"); @@ -182,14 +184,14 @@ static const WCHAR *STRING_evaluate( const string_table *st, return NULL; } -static UINT STRCMP_Evaluate( const string_table *st, MSIVIEW *table, UINT row, - const struct expr *cond, INT *val, const MSIRECORD *record ) +static UINT STRCMP_Evaluate( MSIWHEREVIEW *wv, UINT row, const struct expr *cond, + INT *val, const MSIRECORD *record ) { int sr; const WCHAR *l_str, *r_str; - l_str = STRING_evaluate( st, table, row, cond->u.expr.left, record ); - r_str = STRING_evaluate( st, table, row, cond->u.expr.right, record ); + l_str = STRING_evaluate( wv, row, cond->u.expr.left, record ); + r_str = STRING_evaluate( wv, row, cond->u.expr.right, record ); if( l_str == r_str ) sr = 0; else if( l_str && ! r_str ) @@ -206,8 +208,8 @@ static UINT STRCMP_Evaluate( const string_table *st, MSIVIEW *table, UINT row, return ERROR_SUCCESS; } -static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row, - const struct expr *cond, INT *val, MSIRECORD *record ) +static UINT WHERE_evaluate( MSIWHEREVIEW *wv, UINT row, + struct expr *cond, INT *val, MSIRECORD *record ) { UINT r, tval; INT lval, rval; @@ -218,12 +220,12 @@ static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row, switch( cond->type ) { case EXPR_COL_NUMBER: - r = table->ops->fetch_int( table, row, cond->u.col_number, &tval ); + r = wv->table->ops->fetch_int( wv->table, row, cond->u.col_number, &tval ); *val = tval - 0x8000; return ERROR_SUCCESS; case EXPR_COL_NUMBER32: - r = table->ops->fetch_int( table, row, cond->u.col_number, &tval ); + r = wv->table->ops->fetch_int( wv->table, row, cond->u.col_number, &tval ); *val = tval - 0x80000000; return r; @@ -232,27 +234,27 @@ static UINT WHERE_evaluate( MSIDATABASE *db, MSIVIEW *table, UINT row, return ERROR_SUCCESS; case EXPR_COMPLEX: - r = WHERE_evaluate( db, table, row, cond->u.expr.left, &lval, record ); + r = WHERE_evaluate( wv, row, cond->u.expr.left, &lval, record ); if( r != ERROR_SUCCESS ) return r; - r = WHERE_evaluate( db, table, row, cond->u.expr.right, &rval, record ); + r = WHERE_evaluate( wv, row, cond->u.expr.right, &rval, record ); if( r != ERROR_SUCCESS ) return r; *val = INT_evaluate_binary( lval, cond->u.expr.op, rval ); return ERROR_SUCCESS; case EXPR_UNARY: - r = table->ops->fetch_int( table, row, cond->u.expr.left->u.col_number, &tval ); + r = wv->table->ops->fetch_int( wv->table, row, cond->u.expr.left->u.col_number, &tval ); if( r != ERROR_SUCCESS ) return r; *val = INT_evaluate_unary( tval, cond->u.expr.op ); return ERROR_SUCCESS; case EXPR_STRCMP: - return STRCMP_Evaluate( db->strings, table, row, cond, val, record ); + return STRCMP_Evaluate( wv, row, cond, val, record ); case EXPR_WILDCARD: - *val = MSI_RecordGetInteger( record, 1 ); + *val = MSI_RecordGetInteger( record, ++wv->rec_index ); return ERROR_SUCCESS; default: @@ -338,7 +340,8 @@ static UINT WHERE_execute( struct tagMSIVIEW *view, MSIRECORD *record ) for( i=0; i<count; i++ ) { val = 0; - r = WHERE_evaluate( wv->db, table, i, wv->cond, &val, record ); + wv->rec_index = 0; + r = WHERE_evaluate( wv, i, wv->cond, &val, record ); if( r != ERROR_SUCCESS ) return r; if( val ) @@ -603,6 +606,7 @@ UINT WHERE_CreateView( MSIDATABASE *db, MSIVIEW **view, MSIVIEW *table, wv->row_count = 0; wv->reorder = NULL; wv->cond = cond; + wv->rec_index = 0; *view = (MSIVIEW*) wv; return ERROR_SUCCESS;
1
0
0
0
Roderick Colenbrander : wgl: Add WGL_NV_float_buffer and WGL_NV_texture_rectangle support.
by Alexandre Julliard
30 Jul '07
30 Jul '07
Module: wine Branch: master Commit: 8873478e052fb186c252de1b6e9cb84d8c72fadd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8873478e052fb186c252de1b6…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net> Date: Fri Jul 27 15:01:52 2007 +0200 wgl: Add WGL_NV_float_buffer and WGL_NV_texture_rectangle support. --- dlls/winex11.drv/opengl.c | 76 ++++++++++++++++++++++++++++++++++++++++++--- include/wine/wgl.h | 40 +++++++++++++++++++++++ 2 files changed, 111 insertions(+), 5 deletions(-) diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index db9eb44..89238ef 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -759,9 +759,17 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf } } break ; - + case WGL_FLOAT_COMPONENTS_NV: + pop = iWGLAttr[++cur]; + PUSH2(oGLXAttr, GLX_FLOAT_COMPONENTS_NV, pop); + TRACE("pAttr[%d] = GLX_FLOAT_COMPONENTS_NV: %x\n", cur, pop); + break ; case WGL_BIND_TO_TEXTURE_RGB_ARB: case WGL_BIND_TO_TEXTURE_RGBA_ARB: + case WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV: + case WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV: + case WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV: + case WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV: pop = iWGLAttr[++cur]; /** cannot be converted, see direct handling on * - wglGetPixelFormatAttribivARB @@ -2023,7 +2031,22 @@ static HPBUFFERARB WINAPI X11DRV_wglCreatePbufferARB(HDC hdc, int iPixelFormat, case WGL_TEXTURE_RGBA_ARB: object->use_render_texture = GL_RGBA; break; + + /* WGL_FLOAT_COMPONENTS_NV */ + case WGL_TEXTURE_FLOAT_R_NV: + object->use_render_texture = GL_FLOAT_R_NV; + break; + case WGL_TEXTURE_FLOAT_RG_NV: + object->use_render_texture = GL_FLOAT_RG_NV; + break; + case WGL_TEXTURE_FLOAT_RGB_NV: + object->use_render_texture = GL_FLOAT_RGB_NV; + break; + case WGL_TEXTURE_FLOAT_RGBA_NV: + object->use_render_texture = GL_FLOAT_RGBA_NV; + break; default: + ERR("Unknown texture format: %x\n", attr_v); SetLastError(ERROR_INVALID_DATA); goto create_failed; } @@ -2080,7 +2103,13 @@ static HPBUFFERARB WINAPI X11DRV_wglCreatePbufferARB(HDC hdc, int iPixelFormat, object->texture_bind_target = GL_TEXTURE_2D; break; } + case WGL_TEXTURE_RECTANGLE_NV: { + object->texture_target = GL_TEXTURE_RECTANGLE_NV; + object->texture_bind_target = GL_TEXTURE_BINDING_RECTANGLE_NV; + break; + } default: + ERR("Unknown texture target: %x\n", attr_v); SetLastError(ERROR_INVALID_DATA); goto create_failed; } @@ -2212,10 +2241,28 @@ static GLboolean WINAPI X11DRV_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAtt SetLastError(ERROR_INVALID_HANDLE); return GL_FALSE; } - if (GL_RGBA == object->use_render_texture) { - *piValue = WGL_TEXTURE_RGBA_ARB; - } else { - *piValue = WGL_TEXTURE_RGB_ARB; + switch(object->use_render_texture) { + case GL_RGB: + *piValue = WGL_TEXTURE_RGB_ARB; + break; + case GL_RGBA: + *piValue = WGL_TEXTURE_RGBA_ARB; + break; + /* WGL_FLOAT_COMPONENTS_NV */ + case GL_FLOAT_R_NV: + *piValue = WGL_TEXTURE_FLOAT_R_NV; + break; + case GL_FLOAT_RG_NV: + *piValue = WGL_TEXTURE_FLOAT_RG_NV; + break; + case GL_FLOAT_RGB_NV: + *piValue = WGL_TEXTURE_FLOAT_RGB_NV; + break; + case GL_FLOAT_RGBA_NV: + *piValue = WGL_TEXTURE_FLOAT_RGBA_NV; + break; + default: + ERR("Unknown texture format: %x\n", object->use_render_texture); } } } @@ -2245,6 +2292,7 @@ static GLboolean WINAPI X11DRV_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAtt case GL_TEXTURE_1D: *piValue = WGL_TEXTURE_1D_ARB; break; case GL_TEXTURE_2D: *piValue = WGL_TEXTURE_2D_ARB; break; case GL_TEXTURE_CUBE_MAP: *piValue = WGL_TEXTURE_CUBE_MAP_ARB; break; + case GL_TEXTURE_RECTANGLE_NV: *piValue = WGL_TEXTURE_RECTANGLE_NV; break; } } } @@ -2792,6 +2840,14 @@ static BOOL glxRequireExtension(const char *requiredExtension) return TRUE; } +static void register_extension_string(const char *ext) +{ + strcat(WineGLInfo.wglExtensions, " "); + strcat(WineGLInfo.wglExtensions, ext); + + TRACE("'%s'\n", ext); +} + static BOOL register_extension(const WineGLExtension * ext) { int i; @@ -2944,8 +3000,18 @@ static void X11DRV_WineGL_LoadExtensions(void) if (glxRequireExtension("GLX_ATI_render_texture") || glxRequireExtension("GLX_ARB_render_texture") || (glxRequireVersion(3) && glxRequireExtension("GLX_SGIX_pbuffer") && use_render_texture_emulation)) + { register_extension(&WGL_ARB_render_texture); + /* The WGL version of GLX_NV_float_buffer requires render_texture */ + if(glxRequireExtension("GLX_NV_float_buffer")) + register_extension_string("WGL_NV_float_buffer"); + + /* Again there's no GLX equivalent for this extension, so depend on the required GL extension */ + if(strstr(WineGLInfo.glExtensions, "GL_NV_texture_rectangle") != NULL) + register_extension_string("WGL_NV_texture_rectangle"); + } + /* EXT Extensions */ register_extension(&WGL_EXT_extensions_string); diff --git a/include/wine/wgl.h b/include/wine/wgl.h index e191407..14dfa42 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -139,6 +139,44 @@ #define WGL_AUX8_ARB 0x208F #define WGL_AUX9_ARB 0x2090 +/** WGL_NV_render_texture_rectangle */ +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +/** WGL_NV_render_depth_texture */ +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +/** WGL_NV_float_buffer */ +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +/** GL_NV_float_buffer */ +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E + + /** * WGL_ATI_pixel_format_float / WGL_ARB_color_buffer_float */ @@ -189,3 +227,5 @@ #define GLX_AUX9_ATI 0x9820 #define GLX_BIND_TO_TEXTURE_LUMINANCE_ATI 0x9821 #define GLX_BIND_TO_TEXTURE_INTENSITY_ATI 0x9822 +/** GLX_NV_float_buffer */ +#define GLX_FLOAT_COMPONENTS_NV 0x20B0
1
0
0
0
← Newer
1
...
10
11
12
13
14
15
16
...
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