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
March 2010
----- 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
919 discussions
Start a n
N
ew thread
Rob Shearman : widl: Remove some unused functions, definitions and types.
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: 5d985a80282fba5b1cc36ad2c5bc2d0330fcbae7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d985a80282fba5b1cc36ad2c…
Author: Rob Shearman <robertshearman(a)gmail.com> Date: Mon Mar 15 19:29:33 2010 +0000 widl: Remove some unused functions, definitions and types. --- tools/widl/typegen.c | 110 ++++++++++++++++++++--------------------------- tools/widl/typegen.h | 2 - tools/widl/widltypes.h | 7 --- 3 files changed, 47 insertions(+), 72 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index c35020c..60668dd 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -202,6 +202,30 @@ static unsigned char get_enum_fc(const type_t *type) return RPC_FC_ENUM16; } +static type_t *get_user_type(const type_t *t, const char **pname) +{ + for (;;) + { + type_t *ut = get_attrp(t->attrs, ATTR_WIREMARSHAL); + if (ut) + { + if (pname) + *pname = t->name; + return ut; + } + + if (type_is_alias(t)) + t = type_alias_get_aliasee(t); + else + return NULL; + } +} + +static int is_user_type(const type_t *t) +{ + return get_user_type(t, NULL) != NULL; +} + enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *attrs, unsigned int flags) { if (is_user_type(type)) @@ -252,6 +276,29 @@ enum typegen_type typegen_detect_type(const type_t *type, const attr_list_t *att return TGT_INVALID; } +static int get_padding(const var_list_t *fields) +{ + unsigned short offset = 0; + unsigned int salign = 1; + const var_t *f; + + if (!fields) + return 0; + + LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) + { + type_t *ft = f->type; + unsigned int align = 0; + unsigned int size = type_memsize(ft, &align); + align = clamp_align(align); + if (align > salign) salign = align; + offset = ROUND_SIZE(offset, align); + offset += size; + } + + return ROUNDING(offset, salign); +} + unsigned char get_struct_fc(const type_t *type) { int has_pointer = 0; @@ -472,22 +519,6 @@ static unsigned char get_array_fc(const type_t *type) return fc; } -int is_struct(unsigned char type) -{ - switch (type) - { - case RPC_FC_STRUCT: - case RPC_FC_PSTRUCT: - case RPC_FC_CSTRUCT: - case RPC_FC_CPSTRUCT: - case RPC_FC_CVSTRUCT: - case RPC_FC_BOGUS_STRUCT: - return 1; - default: - return 0; - } -} - static int is_non_complex_struct(const type_t *type) { return (type_get_type(type) == TYPE_STRUCT && @@ -626,30 +657,6 @@ static void guard_rec(type_t *type) type->typestring_offset = 1; } -static type_t *get_user_type(const type_t *t, const char **pname) -{ - for (;;) - { - type_t *ut = get_attrp(t->attrs, ATTR_WIREMARSHAL); - if (ut) - { - if (pname) - *pname = t->name; - return ut; - } - - if (type_is_alias(t)) - t = type_alias_get_aliasee(t); - else - return NULL; - } -} - -int is_user_type(const type_t *t) -{ - return get_user_type(t, NULL) != NULL; -} - static int is_embedded_complex(const type_t *type) { switch (typegen_detect_type(type, NULL, TDT_ALL_TYPES)) @@ -1177,29 +1184,6 @@ static unsigned int union_memsize(const var_list_t *fields, unsigned int *pmaxa) return maxs; } -int get_padding(const var_list_t *fields) -{ - unsigned short offset = 0; - unsigned int salign = 1; - const var_t *f; - - if (!fields) - return 0; - - LIST_FOR_EACH_ENTRY(f, fields, const var_t, entry) - { - type_t *ft = f->type; - unsigned int align = 0; - unsigned int size = type_memsize(ft, &align); - align = clamp_align(align); - if (align > salign) salign = align; - offset = ROUND_SIZE(offset, align); - offset += size; - } - - return ROUNDING(offset, salign); -} - unsigned int type_memsize(const type_t *t, unsigned int *align) { unsigned int size = 0; diff --git a/tools/widl/typegen.h b/tools/widl/typegen.h index 2b2e65d..242b40d 100644 --- a/tools/widl/typegen.h +++ b/tools/widl/typegen.h @@ -84,8 +84,6 @@ unsigned int type_memsize(const type_t *t, unsigned int *align); int decl_indirect(const type_t *t); void write_parameters_init(FILE *file, int indent, const var_t *func, const char *local_var_prefix); void print(FILE *file, int indent, const char *format, va_list ap); -int get_padding(const var_list_t *fields); -int is_user_type(const type_t *t); expr_t *get_size_is_expr(const type_t *t, const char *name); int is_full_pointer_function(const var_t *func); void write_full_pointer_init(FILE *file, int indent, const var_t *func, int is_server); diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index a44e02a..18f601c 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -35,15 +35,10 @@ typedef GUID UUID; #define TRUE 1 #define FALSE 0 -#define RPC_FC_MODULE 0xfc -#define RPC_FC_COCLASS 0xfd -#define RPC_FC_FUNCTION 0xfe - typedef struct _loc_info_t loc_info_t; typedef struct _attr_t attr_t; typedef struct _expr_t expr_t; typedef struct _type_t type_t; -typedef struct _typeref_t typeref_t; typedef struct _var_t var_t; typedef struct _declarator_t declarator_t; typedef struct _func_t func_t; @@ -520,8 +515,6 @@ int is_ptr(const type_t *t); int is_array(const type_t *t); int is_var_ptr(const var_t *v); int cant_be_null(const var_t *v); -int is_struct(unsigned char tc); -int is_union(unsigned char tc); #define tsENUM 1 #define tsSTRUCT 2
1
0
0
0
Juan Lang : crypt32: Add support for the anyPolicy certificate policy.
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: 51ab77a90a361745e6cef9fecaa488b527f0c219 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51ab77a90a361745e6cef9fec…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Fri Mar 5 17:01:30 2010 -0800 crypt32: Add support for the anyPolicy certificate policy. --- dlls/crypt32/chain.c | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 75 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c index 6cdd103..1724f42 100644 --- a/dlls/crypt32/chain.c +++ b/dlls/crypt32/chain.c @@ -1306,6 +1306,78 @@ static void CRYPT_CheckChainNameConstraints(PCERT_SIMPLE_CHAIN chain) } } +/* Gets cert's policies info, if any. Free with LocalFree. */ +static CERT_POLICIES_INFO *CRYPT_GetPolicies(PCCERT_CONTEXT cert) +{ + PCERT_EXTENSION ext; + CERT_POLICIES_INFO *policies = NULL; + + ext = CertFindExtension(szOID_KEY_USAGE, cert->pCertInfo->cExtension, + cert->pCertInfo->rgExtension); + if (ext) + { + DWORD size; + + CryptDecodeObjectEx(X509_ASN_ENCODING, X509_CERT_POLICIES, + ext->Value.pbData, ext->Value.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, + &policies, &size); + } + return policies; +} + +static void CRYPT_CheckPolicies(CERT_POLICIES_INFO *policies, CERT_INFO *cert, + DWORD *errorStatus) +{ + DWORD i; + + for (i = 0; i < policies->cPolicyInfo; i++) + { + /* For now, the only accepted policy identifier is the anyPolicy + * identifier. + * FIXME: the policy identifiers should be compared against the + * cert's certificate policies extension, subject to the policy + * mappings extension, and the policy constraints extension. + * See RFC 5280, sections 4.2.1.4, 4.2.1.5, and 4.2.1.11. + */ + if (strcmp(policies->rgPolicyInfo[i].pszPolicyIdentifier, + szOID_ANY_CERT_POLICY)) + { + FIXME("unsupported policy %s\n", + policies->rgPolicyInfo[i].pszPolicyIdentifier); + *errorStatus |= CERT_TRUST_INVALID_POLICY_CONSTRAINTS; + } + } +} + +static void CRYPT_CheckChainPolicies(PCERT_SIMPLE_CHAIN chain) +{ + int i, j; + + for (i = chain->cElement - 1; i > 0; i--) + { + CERT_POLICIES_INFO *policies; + + if ((policies = CRYPT_GetPolicies(chain->rgpElement[i]->pCertContext))) + { + for (j = i - 1; j >= 0; j--) + { + DWORD errorStatus = 0; + + CRYPT_CheckPolicies(policies, + chain->rgpElement[j]->pCertContext->pCertInfo, &errorStatus); + if (errorStatus) + { + chain->rgpElement[i]->TrustStatus.dwErrorStatus |= + errorStatus; + CRYPT_CombineTrustStatus(&chain->TrustStatus, + &chain->rgpElement[i]->TrustStatus); + } + } + LocalFree(policies); + } + } +} + static LPWSTR name_value_to_str(const CERT_NAME_BLOB *name) { DWORD len = cert_name_to_str_with_indent(X509_ASN_ENCODING, 0, name, @@ -1739,6 +1811,8 @@ static BOOL CRYPT_CriticalExtensionsSupported(PCCERT_CONTEXT cert) ret = TRUE; else if (!strcmp(oid, szOID_SUBJECT_ALT_NAME2)) ret = TRUE; + else if (!strcmp(oid, szOID_CERT_POLICIES)) + ret = TRUE; else if (!strcmp(oid, szOID_ENHANCED_KEY_USAGE)) ret = TRUE; else @@ -1883,6 +1957,7 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine, &chain->rgpElement[i]->TrustStatus); } CRYPT_CheckChainNameConstraints(chain); + CRYPT_CheckChainPolicies(chain); if (CRYPT_IsCertificateSelfSigned(rootElement->pCertContext)) { rootElement->TrustStatus.dwInfoStatus |=
1
0
0
0
Juan Lang : crypt32: Switch to use the AES provider by default.
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: ffba84b161f0cb024d3966a1e396a971a2e482ec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ffba84b161f0cb024d3966a1e…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 8 12:16:55 2010 -0800 crypt32: Switch to use the AES provider by default. --- dlls/crypt32/main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c index 5844b18..db9dc1a 100644 --- a/dlls/crypt32/main.c +++ b/dlls/crypt32/main.c @@ -64,8 +64,8 @@ HCRYPTPROV CRYPT_GetDefaultProvider(void) { HCRYPTPROV prov; - if (!CryptAcquireContextW(&prov, NULL, MS_ENHANCED_PROV_W, PROV_RSA_FULL, - CRYPT_VERIFYCONTEXT)) + if (!CryptAcquireContextW(&prov, NULL, MS_ENH_RSA_AES_PROV_W, + PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) return hDefProv; InterlockedCompareExchangePointer((PVOID *)&hDefProv, (PVOID)prov, NULL);
1
0
0
0
Juan Lang : crypt32: Add constants to support SHA-256, SHA-384, and SHA-512 .
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: a729e10a187a536c246cfd916ee2e0646585301a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a729e10a187a536c246cfd916…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 8 13:28:48 2010 -0800 crypt32: Add constants to support SHA-256, SHA-384, and SHA-512. --- dlls/crypt32/oid.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/oid.c b/dlls/crypt32/oid.c index ea30d9c..ea7b539 100644 --- a/dlls/crypt32/oid.c +++ b/dlls/crypt32/oid.c @@ -1067,6 +1067,9 @@ static const WCHAR rc2[] = { 'r','c','2',0 }; static const WCHAR rc4[] = { 'r','c','4',0 }; static const WCHAR sha[] = { 's','h','a',0 }; static const WCHAR sha1[] = { 's','h','a','1',0 }; +static const WCHAR sha256[] = { 's','h','a','2','5','6',0 }; +static const WCHAR sha384[] = { 's','h','a','3','8','4',0 }; +static const WCHAR sha512[] = { 's','h','a','5','1','2',0 }; static const WCHAR RSA[] = { 'R','S','A',0 }; static const WCHAR RSA_KEYX[] = { 'R','S','A','_','K','E','Y','X',0 }; static const WCHAR RSA_SIGN[] = { 'R','S','A','_','S','I','G','N',0 }; @@ -1086,6 +1089,9 @@ static const WCHAR shaDSA[] = { 's','h','a','D','S','A',0 }; static const WCHAR sha1DSA[] = { 's','h','a','1','D','S','A',0 }; static const WCHAR shaRSA[] = { 's','h','a','R','S','A',0 }; static const WCHAR sha1RSA[] = { 's','h','a','1','R','S','A',0 }; +static const WCHAR sha256RSA[] = { 's','h','a','2','5','6','R','S','A',0 }; +static const WCHAR sha384RSA[] = { 's','h','a','3','8','4','R','S','A',0 }; +static const WCHAR sha512RSA[] = { 's','h','a','5','1','2','R','S','A',0 }; static const WCHAR mosaicUpdatedSig[] = { 'm','o','s','a','i','c','U','p','d','a','t','e','d','S','i','g',0 }; static const WCHAR CN[] = { 'C','N',0 }; @@ -1189,6 +1195,9 @@ static const struct OIDInfoConstructor { { 3, szOID_PKIX_NO_SIGNATURE, CALG_NO_SIGN, NO_SIGN, NULL }, { 4, szOID_RSA_SHA1RSA, CALG_SHA1, sha1RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA256RSA, CALG_SHA_256, sha256RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA384RSA, CALG_SHA_384, sha384RSA, &rsaSignBlob }, + { 4, szOID_RSA_SHA512RSA, CALG_SHA_512, sha512RSA, &rsaSignBlob }, { 4, szOID_RSA_MD5RSA, CALG_MD5, md5RSA, &rsaSignBlob }, { 4, szOID_X957_SHA1DSA, CALG_SHA1, sha1DSA, &dssSignBlob }, { 4, szOID_OIWSEC_sha1RSASign, CALG_SHA1, sha1RSA, &rsaSignBlob },
1
0
0
0
Juan Lang : rsaenh: Add signature support for SHA-256, SHA-384, and SHA-512 hashes.
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: 89b8adb2625e17537deae39b525d86c5f3729d4d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=89b8adb2625e17537deae39b5…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 8 13:06:37 2010 -0800 rsaenh: Add signature support for SHA-256, SHA-384, and SHA-512 hashes. --- dlls/rsaenh/rsaenh.c | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index 7c3d053..74ad392 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -1425,8 +1425,8 @@ static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid, static const struct tagOIDDescriptor { ALG_ID aiAlgid; DWORD dwLen; - CONST BYTE abOID[18]; - } aOIDDescriptor[5] = { + CONST BYTE abOID[19]; + } aOIDDescriptor[8] = { { CALG_MD2, 18, { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x02, 0x02, 0x05, 0x00, 0x04, 0x10 } }, { CALG_MD4, 18, { 0x30, 0x20, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x86, 0x48, @@ -1435,6 +1435,15 @@ static BOOL build_hash_signature(BYTE *pbSignature, DWORD dwLen, ALG_ID aiAlgid, 0x86, 0xf7, 0x0d, 0x02, 0x05, 0x05, 0x00, 0x04, 0x10 } }, { CALG_SHA, 15, { 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14 } }, + { CALG_SHA_256, 19, { 0x30, 0x31, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x20 } }, + { CALG_SHA_384, 19, { 0x30, 0x41, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x30 } }, + { CALG_SHA_384, 19, { 0x30, 0x51, 0x30, 0x0d, 0x06, 0x09, 0x60, 0x86, + 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, + 0x05, 0x00, 0x04, 0x40 } }, { 0, 0, { 0 } } }; DWORD dwIdxOID, i, j;
1
0
0
0
Juan Lang : rsaenh: Add support for SHA-256, SHA-384, and SHA-512.
by Alexandre Julliard
16 Mar '10
16 Mar '10
Module: wine Branch: master Commit: 311d839dec7591515463696fa389fe4d0e48e3f7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=311d839dec7591515463696fa…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Mon Mar 15 12:04:29 2010 -0700 rsaenh: Add support for SHA-256, SHA-384, and SHA-512. --- dlls/rsaenh/Makefile.in | 3 +- dlls/rsaenh/implglue.c | 36 ++ dlls/rsaenh/implglue.h | 4 + dlls/rsaenh/rsaenh.c | 3 + dlls/rsaenh/sha2.c | 1003 ++++++++++++++++++++++++++++++++++++++++++++ dlls/rsaenh/sha2.h | 89 ++++ dlls/rsaenh/tests/rsaenh.c | 3 - 7 files changed, 1137 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=311d839dec75915154636…
1
0
0
0
Maarten Lankhorst : mmdevapi: Pass a property bag to IBaseFilter in IMMDevice::Activate.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 693c991626cce42f824f1c75227df46333ce1a8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=693c991626cce42f824f1c752…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Feb 21 14:31:24 2010 +0100 mmdevapi: Pass a property bag to IBaseFilter in IMMDevice::Activate. --- dlls/mmdevapi/devenum.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 79 insertions(+), 0 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index f39fe97..9d1adb1 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -94,6 +94,12 @@ typedef struct MMDevColImpl DWORD state; } MMDevColImpl; +typedef struct IPropertyBagImpl { + const IPropertyBagVtbl *lpVtbl; + GUID devguid; +} IPropertyBagImpl; +static const IPropertyBagVtbl PB_Vtbl; + static HRESULT MMDevPropStore_Create(MMDevice *This, DWORD access, IPropertyStore **ppv); /* Creates or updates the state of a device @@ -275,6 +281,26 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls hr = CoCreateInstance(&CLSID_DSoundRender, NULL, clsctx, riid, ppv); else ERR("Not supported for recording?\n"); + if (SUCCEEDED(hr)) + { + IPersistPropertyBag *ppb; + hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag, (void*)&ppb); + if (SUCCEEDED(hr)) + { + /* ::Load cannot assume the interface stays alive after the function returns, + * so just create the interface on the stack, saves a lot of complicated code */ + IPropertyBagImpl bag = { &PB_Vtbl, This->devguid }; + hr = IPersistPropertyBag_Load(ppb, (IPropertyBag*)&bag, NULL); + IPersistPropertyBag_Release(ppb); + if (FAILED(hr)) + IBaseFilter_Release((IBaseFilter*)*ppv); + } + else + { + FIXME("Wine doesn't support IPersistPropertyBag on DSoundRender yet, ignoring..\n"); + hr = S_OK; + } + } } else if (IsEqualIID(riid, &IID_IDeviceTopology)) { @@ -1035,3 +1061,56 @@ static const IPropertyStoreVtbl MMDevPropVtbl = MMDevPropStore_SetValue, MMDevPropStore_Commit }; + + +/* Property bag for IBaseFilter activation */ +static HRESULT WINAPI PB_QueryInterface(IPropertyBag *iface, REFIID riid, void **ppv) +{ + ERR("Should not be called\n"); + *ppv = NULL; + return E_NOINTERFACE; +} + +static ULONG WINAPI PB_AddRef(IPropertyBag *iface) +{ + ERR("Should not be called\n"); + return 2; +} + +static ULONG WINAPI PB_Release(IPropertyBag *iface) +{ + ERR("Should not be called\n"); + return 1; +} + +static HRESULT WINAPI PB_Read(IPropertyBag *iface, LPCOLESTR name, VARIANT *var, IErrorLog *log) +{ + static const WCHAR dsguid[] = { 'D','S','G','u','i','d', 0 }; + IPropertyBagImpl *This = (IPropertyBagImpl*)iface; + TRACE("Trying to read %s, type %u\n", debugstr_w(name), var->n1.n2.vt); + if (!lstrcmpW(name, dsguid)) + { + WCHAR guidstr[39]; + StringFromGUID2(&This->devguid, guidstr,sizeof(guidstr)/sizeof(*guidstr)); + var->n1.n2.vt = VT_BSTR; + var->n1.n2.n3.bstrVal = SysAllocString(guidstr); + return S_OK; + } + ERR("Unknown property '%s' queried\n", debugstr_w(name)); + return E_FAIL; +} + +static HRESULT WINAPI PB_Write(IPropertyBag *iface, LPCOLESTR name, VARIANT *var) +{ + ERR("Should not be called\n"); + return E_FAIL; +} + +static const IPropertyBagVtbl PB_Vtbl = +{ + PB_QueryInterface, + PB_AddRef, + PB_Release, + PB_Read, + PB_Write +};
1
0
0
0
Maarten Lankhorst : mmdevapi: Implement IMMDeviceEnumerator::GetDevice.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 55b48ff66299a07d41756c1b199806846d4fc415 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55b48ff66299a07d41756c1b1…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Feb 21 14:26:43 2010 +0100 mmdevapi: Implement IMMDeviceEnumerator::GetDevice. --- dlls/mmdevapi/devenum.c | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index cbe4ab0..f39fe97 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -809,9 +809,31 @@ static HRESULT WINAPI MMDevEnum_GetDefaultAudioEndpoint(IMMDeviceEnumerator *ifa static HRESULT WINAPI MMDevEnum_GetDevice(IMMDeviceEnumerator *iface, const WCHAR *name, IMMDevice **device) { MMDevEnumImpl *This = (MMDevEnumImpl*)iface; + DWORD i=0; + IMMDevice *dev = NULL; + TRACE("(%p)->(%s,%p)\n", This, debugstr_w(name), device); - FIXME("stub\n"); - return E_NOTIMPL; + for (i = 0; i < MMDevice_count; ++i) + { + WCHAR *str; + dev = (IMMDevice*)MMDevice_head[i]; + IMMDevice_GetId(dev, &str); + + if (str && !lstrcmpW(str, name)) + { + CoTaskMemFree(str); + break; + } + CoTaskMemFree(str); + } + if (dev) + { + IUnknown_AddRef(dev); + *device = dev; + return S_OK; + } + WARN("Could not find device %s\n", debugstr_w(name)); + return E_NOTFOUND; } static HRESULT WINAPI MMDevEnum_RegisterEndpointNotificationCallback(IMMDeviceEnumerator *iface, IMMNotificationClient *client)
1
0
0
0
Maarten Lankhorst : mmdevapi: Implement MMDeviceCollection methods.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: d53dc08ec5c9ab39e97d5e33c71f30658c663e3b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d53dc08ec5c9ab39e97d5e33c…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Feb 21 14:24:42 2010 +0100 mmdevapi: Implement MMDeviceCollection methods. --- dlls/mmdevapi/devenum.c | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index b711db2..cbe4ab0 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -468,20 +468,45 @@ static ULONG WINAPI MMDevCol_Release(IMMDeviceCollection *iface) static HRESULT WINAPI MMDevCol_GetCount(IMMDeviceCollection *iface, UINT *numdevs) { MMDevColImpl *This = (MMDevColImpl*)iface; + DWORD i; TRACE("(%p)->(%p)\n", This, numdevs); if (!numdevs) return E_POINTER; + *numdevs = 0; + for (i = 0; i < MMDevice_count; ++i) + { + MMDevice *cur = MMDevice_head[i]; + if ((cur->flow == This->flow || This->flow == eAll) + && (cur->state & This->state)) + ++(*numdevs); + } return S_OK; } -static HRESULT WINAPI MMDevCol_Item(IMMDeviceCollection *iface, UINT i, IMMDevice **dev) +static HRESULT WINAPI MMDevCol_Item(IMMDeviceCollection *iface, UINT n, IMMDevice **dev) { MMDevColImpl *This = (MMDevColImpl*)iface; - TRACE("(%p)->(%u, %p)\n", This, i, dev); + DWORD i = 0, j = 0; + + TRACE("(%p)->(%u, %p)\n", This, n, dev); if (!dev) return E_POINTER; + + for (j = 0; j < MMDevice_count; ++j) + { + MMDevice *cur = MMDevice_head[j]; + if ((cur->flow == This->flow || This->flow == eAll) + && (cur->state & This->state) + && i++ == n) + { + *dev = (IMMDevice *)cur; + IMMDevice_AddRef(*dev); + return S_OK; + } + } + WARN("Could not obtain item %u\n", n); *dev = NULL; return E_INVALIDARG; }
1
0
0
0
Maarten Lankhorst : mmdevapi: Implement some methods in IMMDevice.
by Alexandre Julliard
15 Mar '10
15 Mar '10
Module: wine Branch: master Commit: 9371fd5f95ec8402b9984beb9596b1c1d7aebcfc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9371fd5f95ec8402b9984beb9…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Feb 21 14:19:57 2010 +0100 mmdevapi: Implement some methods in IMMDevice. --- dlls/mmdevapi/devenum.c | 73 +++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 68 insertions(+), 5 deletions(-) diff --git a/dlls/mmdevapi/devenum.c b/dlls/mmdevapi/devenum.c index 32a337a..b711db2 100644 --- a/dlls/mmdevapi/devenum.c +++ b/dlls/mmdevapi/devenum.c @@ -256,8 +256,60 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid, DWORD cls if (!ppv) return E_POINTER; - FIXME("stub\n"); - hr = E_NOTIMPL; + if (IsEqualIID(riid, &IID_IAudioClient)) + { + FIXME("IID_IAudioClient unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IAudioEndpointVolume)) + { + FIXME("IID_IAudioEndpointVolume unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IAudioSessionManager) + || IsEqualIID(riid, &IID_IAudioSessionManager2)) + { + FIXME("IID_IAudioSessionManager unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IBaseFilter)) + { + if (This->flow == eRender) + hr = CoCreateInstance(&CLSID_DSoundRender, NULL, clsctx, riid, ppv); + else + ERR("Not supported for recording?\n"); + } + else if (IsEqualIID(riid, &IID_IDeviceTopology)) + { + FIXME("IID_IDeviceTopology unsupported\n"); + } + else if (IsEqualIID(riid, &IID_IDirectSound) + || IsEqualIID(riid, &IID_IDirectSound8)) + { + if (This->flow == eRender) + hr = CoCreateInstance(&CLSID_DirectSound8, NULL, clsctx, riid, ppv); + if (SUCCEEDED(hr)) + { + hr = IDirectSound_Initialize((IDirectSound*)*ppv, &This->devguid); + if (FAILED(hr)) + IDirectSound_Release((IDirectSound*)*ppv); + } + } + else if (IsEqualIID(riid, &IID_IDirectSoundCapture) + || IsEqualIID(riid, &IID_IDirectSoundCapture8)) + { + if (This->flow == eCapture) + hr = CoCreateInstance(&CLSID_DirectSoundCapture8, NULL, clsctx, riid, ppv); + if (SUCCEEDED(hr)) + { + hr = IDirectSoundCapture_Initialize((IDirectSoundCapture*)*ppv, &This->devguid); + if (FAILED(hr)) + IDirectSoundCapture_Release((IDirectSoundCapture*)*ppv); + } + } + else + ERR("Invalid/unknown iid %s\n", debugstr_guid(riid)); + + if (FAILED(hr)) + *ppv = NULL; + TRACE("Returning %08x\n", hr); return hr; } @@ -275,13 +327,24 @@ static HRESULT WINAPI MMDevice_OpenPropertyStore(IMMDevice *iface, DWORD access, static HRESULT WINAPI MMDevice_GetId(IMMDevice *iface, WCHAR **itemid) { MMDevice *This = (MMDevice *)iface; + WCHAR *str; + GUID *id = &This->devguid; + static const WCHAR formatW[] = { '{','0','.','0','.','0','.','0','0','0','0','0','0','0','0','}','.', + '{','%','0','8','X','-','%','0','4','X','-', + '%','0','4','X','-','%','0','2','X','%','0','2','X','-', + '%','0','2','X','%','0','2','X','%','0','2','X','%','0','2','X', + '%','0','2','X','%','0','2','X','}',0 }; TRACE("(%p)->(%p)\n", This, itemid); if (!itemid) return E_POINTER; - *itemid = NULL; - FIXME("stub\n"); - return E_NOTIMPL; + *itemid = str = CoTaskMemAlloc(56 * sizeof(WCHAR)); + if (!str) + return E_OUTOFMEMORY; + wsprintfW( str, formatW, id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); + return S_OK; } static HRESULT WINAPI MMDevice_GetState(IMMDevice *iface, DWORD *state)
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
92
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
Results per page:
10
25
50
100
200