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
December 2022
----- 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
1 participants
539 discussions
Start a n
N
ew thread
Hans Leidekker : bcrypt: Support duplicating public keys without access to the private key.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: 5308911a82e5858f419354bcc6d9e35807134bc4 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5308911a82e5858f419354bcc6d9e3…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 17 11:43:56 2022 +0100 bcrypt: Support duplicating public keys without access to the private key. --- dlls/bcrypt/gnutls.c | 99 ++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 15 deletions(-) diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c index aeef64fd642..d5ffe88e2b4 100644 --- a/dlls/bcrypt/gnutls.c +++ b/dlls/bcrypt/gnutls.c @@ -1877,17 +1877,11 @@ static NTSTATUS key_asymmetric_destroy( void *args ) return STATUS_SUCCESS; } -static NTSTATUS key_asymmetric_duplicate( void *args ) +static NTSTATUS dup_privkey( struct key *key_orig, struct key *key_copy ) { - const struct key_asymmetric_duplicate_params *params = args; - struct key *key_orig = params->key_orig; - struct key *key_copy = params->key_copy; gnutls_privkey_t privkey; - gnutls_pubkey_t pubkey; int ret; - if (!key_data(key_orig)->a.privkey) return STATUS_SUCCESS; - if ((ret = pgnutls_privkey_init( &privkey ))) { pgnutls_perror( ret ); @@ -1959,25 +1953,100 @@ static NTSTATUS key_asymmetric_duplicate( void *args ) return STATUS_INTERNAL_ERROR; } - if (key_data(key_orig)->a.pubkey) + key_data(key_copy)->a.privkey = privkey; + return STATUS_SUCCESS; +} + +static NTSTATUS dup_pubkey( struct key *key_orig, struct key *key_copy ) +{ + gnutls_pubkey_t pubkey; + int ret; + + if ((ret = pgnutls_pubkey_init( &pubkey ))) + { + pgnutls_perror( ret ); + return STATUS_INTERNAL_ERROR; + } + + switch (key_orig->alg_id) { - if ((ret = pgnutls_pubkey_init( &pubkey ))) + case ALG_ID_RSA: + case ALG_ID_RSA_SIGN: + { + gnutls_datum_t m, e; + if ((ret = pgnutls_pubkey_export_rsa_raw( key_data(key_orig)->a.pubkey, &m, &e ))) { pgnutls_perror( ret ); - pgnutls_privkey_deinit( privkey ); return STATUS_INTERNAL_ERROR; } - if ((ret = pgnutls_pubkey_import_privkey( pubkey, key_data(key_orig)->a.privkey, 0, 0 ))) + ret = pgnutls_pubkey_import_rsa_raw( pubkey, &m, &e ); + free( m.data ); free( e.data ); + if (ret) { pgnutls_perror( ret ); - pgnutls_pubkey_deinit( pubkey ); - pgnutls_privkey_deinit( privkey ); return STATUS_INTERNAL_ERROR; } - key_data(key_copy)->a.pubkey = pubkey; + break; + } + case ALG_ID_DSA: + { + gnutls_datum_t p, q, g, y; + if ((ret = pgnutls_pubkey_export_dsa_raw( key_data(key_orig)->a.pubkey, &p, &q, &g, &y ))) + { + pgnutls_perror( ret ); + return STATUS_INTERNAL_ERROR; + } + ret = pgnutls_pubkey_import_dsa_raw( pubkey, &p, &q, &g, &y ); + free( p.data ); free( q.data ); free( g.data ); free( y.data ); + if (ret) + { + pgnutls_perror( ret ); + return STATUS_INTERNAL_ERROR; + } + key_copy->u.a.dss_seed = key_orig->u.a.dss_seed; + break; + } + case ALG_ID_ECDH_P256: + case ALG_ID_ECDH_P384: + case ALG_ID_ECDSA_P256: + case ALG_ID_ECDSA_P384: + { + gnutls_ecc_curve_t curve; + gnutls_datum_t x, y; + if ((ret = pgnutls_pubkey_export_ecc_raw( key_data(key_orig)->a.pubkey, &curve, &x, &y ))) + { + pgnutls_perror( ret ); + return STATUS_INTERNAL_ERROR; + } + ret = pgnutls_pubkey_import_ecc_raw( pubkey, curve, &x, &y ); + free( x.data ); free( y.data ); + if (ret) + { + pgnutls_perror( ret ); + return STATUS_INTERNAL_ERROR; + } + break; + } + default: + ERR( "unhandled algorithm %u\n", key_orig->alg_id ); + return STATUS_INTERNAL_ERROR; } - key_data(key_copy)->a.privkey = privkey; + key_data(key_copy)->a.pubkey = pubkey; + return STATUS_SUCCESS; +} + +static NTSTATUS key_asymmetric_duplicate( void *args ) +{ + const struct key_asymmetric_duplicate_params *params = args; + NTSTATUS status; + + if (key_data(params->key_orig)->a.privkey && (status = dup_privkey( params->key_orig, params->key_copy ))) + return status; + + if (key_data(params->key_orig)->a.pubkey && (status = dup_pubkey( params->key_orig, params->key_copy ))) + return status; + return STATUS_SUCCESS; }
1
0
0
0
Hans Leidekker : bcrypt: Validate key type.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: 4c46bd922d286ed14442c548c53710613c5067d7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4c46bd922d286ed14442c548c53710…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Nov 16 17:23:34 2022 +0100 bcrypt: Validate key type. --- dlls/bcrypt/bcrypt_main.c | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index a222cd03d72..72501faf90e 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -121,6 +121,26 @@ builtin_algorithms[] = { BCRYPT_RNG_ALGORITHM, BCRYPT_RNG_INTERFACE, 0, 0, 0 }, }; +static inline BOOL is_symmetric_key( struct key *key ) +{ + return builtin_algorithms[key->alg_id].class == BCRYPT_CIPHER_INTERFACE; +} + +static inline BOOL is_asymmetric_encryption_key( struct key *key ) +{ + return builtin_algorithms[key->alg_id].class == BCRYPT_ASYMMETRIC_ENCRYPTION_INTERFACE; +} + +static inline BOOL is_agreement_key( struct key *key ) +{ + return builtin_algorithms[key->alg_id].class == BCRYPT_SECRET_AGREEMENT_INTERFACE; +} + +static inline BOOL is_signature_key( struct key *key ) +{ + return builtin_algorithms[key->alg_id].class == BCRYPT_SIGNATURE_INTERFACE || key->alg_id == ALG_ID_RSA; +} + static BOOL match_operation_type( ULONG type, ULONG class ) { if (!type) return TRUE; @@ -1119,11 +1139,6 @@ static NTSTATUS key_asymmetric_create( enum alg_id alg_id, ULONG bitlen, struct return STATUS_SUCCESS; } -static BOOL key_is_symmetric( struct key *key ) -{ - return builtin_algorithms[key->alg_id].class == BCRYPT_CIPHER_INTERFACE; -} - static BOOL is_equal_vector( const UCHAR *vector, ULONG len, const UCHAR *vector2, ULONG len2 ) { if (!vector && !vector2) return TRUE; @@ -1505,7 +1520,7 @@ static NTSTATUS key_symmetric_decrypt( struct key *key, UCHAR *input, ULONG inpu static void key_destroy( struct key *key ) { - if (key_is_symmetric( key )) + if (is_symmetric_key( key )) { UNIX_CALL( key_symmetric_destroy, key ); free( key->u.s.vector ); @@ -1868,7 +1883,7 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy ) key_copy->hdr = key_orig->hdr; key_copy->alg_id = key_orig->alg_id; - if (key_is_symmetric( key_orig )) + if (is_symmetric_key( key_orig )) { if (!(buffer = malloc( key_orig->u.s.secret_len ))) return STATUS_NO_MEMORY; memcpy( buffer, key_orig->u.s.secret, key_orig->u.s.secret_len ); @@ -1977,11 +1992,7 @@ NTSTATUS WINAPI BCryptSignHash( BCRYPT_KEY_HANDLE handle, void *padding, UCHAR * ret_len, flags ); if (!key) return STATUS_INVALID_HANDLE; - if (key_is_symmetric( key )) - { - FIXME( "signing with symmetric keys not yet supported\n" ); - return STATUS_NOT_IMPLEMENTED; - } + if (!is_signature_key( key )) return STATUS_NOT_SUPPORTED; params.key = key; params.padding = padding; @@ -2003,8 +2014,8 @@ NTSTATUS WINAPI BCryptVerifySignature( BCRYPT_KEY_HANDLE handle, void *padding, TRACE( "%p, %p, %p, %lu, %p, %lu, %#lx\n", handle, padding, hash, hash_len, signature, signature_len, flags ); if (!key) return STATUS_INVALID_HANDLE; + if (!is_signature_key( key )) return STATUS_NOT_SUPPORTED; if (!hash || !hash_len || !signature || !signature_len) return STATUS_INVALID_PARAMETER; - if (key_is_symmetric( key )) return STATUS_NOT_SUPPORTED; params.key = key; params.padding = padding; @@ -2039,7 +2050,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp if (!key) return STATUS_INVALID_HANDLE; - if (key_is_symmetric( key )) + if (is_symmetric_key( key )) { if (flags & ~BCRYPT_BLOCK_PADDING) { @@ -2057,6 +2068,8 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp FIXME( "flags %#lx not implemented\n", flags ); return STATUS_NOT_IMPLEMENTED; } + if (!is_asymmetric_encryption_key( key )) return STATUS_NOT_SUPPORTED; + asymmetric_params.input = input; asymmetric_params.input_len = input_len; asymmetric_params.key = key; @@ -2081,7 +2094,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp if (!key) return STATUS_INVALID_HANDLE; - if (key_is_symmetric( key )) + if (is_symmetric_key( key )) { if (flags & ~BCRYPT_BLOCK_PADDING) { @@ -2100,6 +2113,8 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp FIXME( "flags %#lx not implemented\n", flags ); return STATUS_NOT_IMPLEMENTED; } + if (!is_asymmetric_encryption_key( key )) return STATUS_NOT_SUPPORTED; + params.key = key; params.input = input; params.input_len = input_len; @@ -2300,6 +2315,7 @@ NTSTATUS WINAPI BCryptSecretAgreement( BCRYPT_KEY_HANDLE privkey_handle, BCRYPT_ FIXME( "%p, %p, %p, %#lx\n", privkey_handle, pubkey_handle, ret_handle, flags ); if (!privkey || !pubkey) return STATUS_INVALID_HANDLE; + if (!is_agreement_key( privkey ) || !is_agreement_key( pubkey )) return STATUS_NOT_SUPPORTED; if (!ret_handle) return STATUS_INVALID_PARAMETER; if (!(secret = calloc( 1, sizeof(*secret) ))) return STATUS_NO_MEMORY;
1
0
0
0
Hans Leidekker : bcrypt: Remove unused argument from hash_finalize().
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: f95c2e4629f6cb15eabc19d71ccbe17c0758cd5d URL:
https://gitlab.winehq.org/wine/wine/-/commit/f95c2e4629f6cb15eabc19d71ccbe1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Nov 16 17:07:19 2022 +0100 bcrypt: Remove unused argument from hash_finalize(). --- dlls/bcrypt/bcrypt_main.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c index 6f6d713c6ac..a222cd03d72 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c @@ -1039,10 +1039,10 @@ NTSTATUS WINAPI BCryptHashData( BCRYPT_HASH_HANDLE handle, UCHAR *input, ULONG s return hash_update( &hash->inner, hash->alg_id, input, size ); } -static NTSTATUS hash_finalize( struct hash *hash, UCHAR *output, ULONG size ) +static NTSTATUS hash_finalize( struct hash *hash, UCHAR *output ) { UCHAR buffer[MAX_HASH_OUTPUT_BYTES]; - int hash_length; + ULONG hash_length = builtin_algorithms[hash->alg_id].hash_length; NTSTATUS status; if (!(hash->flags & HASH_FLAG_HMAC)) @@ -1052,7 +1052,6 @@ static NTSTATUS hash_finalize( struct hash *hash, UCHAR *output, ULONG size ) return STATUS_SUCCESS; } - hash_length = builtin_algorithms[hash->alg_id].hash_length; if ((status = hash_finish( &hash->inner, hash->alg_id, buffer ))) return status; if ((status = hash_update( &hash->outer, hash->alg_id, buffer, hash_length ))) return status; if ((status = hash_finish( &hash->outer, hash->alg_id, output ))) return status; @@ -1070,7 +1069,7 @@ NTSTATUS WINAPI BCryptFinishHash( BCRYPT_HASH_HANDLE handle, UCHAR *output, ULON if (!hash) return STATUS_INVALID_HANDLE; if (!output || size != builtin_algorithms[hash->alg_id].hash_length) return STATUS_INVALID_PARAMETER; - return hash_finalize( hash, output, size ); + return hash_finalize( hash, output ); } NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE handle, UCHAR *secret, ULONG secret_len, @@ -1096,7 +1095,7 @@ NTSTATUS WINAPI BCryptHash( BCRYPT_ALG_HANDLE handle, UCHAR *secret, ULONG secre hash_destroy( hash ); return status; } - status = hash_finalize( hash, output, output_len ); + status = hash_finalize( hash, output ); hash_destroy( hash ); return status; } @@ -2159,9 +2158,9 @@ NTSTATUS WINAPI BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE handle, BCRYPT_ALG_HANDL return STATUS_NOT_IMPLEMENTED; } - len = builtin_algorithms[hash->alg_id].hash_length; - if ((status = hash_finalize( hash, buf, len ))) return status; + if ((status = hash_finalize( hash, buf ))) return status; + len = builtin_algorithms[hash->alg_id].hash_length; if (len < keylen) { UCHAR pad1[HMAC_PAD_LEN], pad2[HMAC_PAD_LEN]; @@ -2175,11 +2174,11 @@ NTSTATUS WINAPI BCryptDeriveKeyCapi( BCRYPT_HASH_HANDLE handle, BCRYPT_ALG_HANDL if ((status = hash_prepare( hash )) || (status = hash_update( &hash->inner, hash->alg_id, pad1, sizeof(pad1) )) || - (status = hash_finalize( hash, buf, len ))) return status; + (status = hash_finalize( hash, buf ))) return status; if ((status = hash_prepare( hash )) || (status = hash_update( &hash->inner, hash->alg_id, pad2, sizeof(pad2) )) || - (status = hash_finalize( hash, buf + len, len ))) return status; + (status = hash_finalize( hash, buf + len ))) return status; } memcpy( key, buf, keylen ); @@ -2219,7 +2218,7 @@ static NTSTATUS pbkdf2( struct hash *hash, UCHAR *pwd, ULONG pwd_len, UCHAR *sal return status; } - if ((status = hash_finalize( hash, buf, hash_len ))) + if ((status = hash_finalize( hash, buf ))) { free( buf ); return status;
1
0
0
0
Hans Leidekker : bcrypt: Fix possible buffer overflow in export_gnutls_datum().
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: ffad823e34f1f940530f72b7e17583da22d39d93 URL:
https://gitlab.winehq.org/wine/wine/-/commit/ffad823e34f1f940530f72b7e17583…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Nov 16 16:51:08 2022 +0100 bcrypt: Fix possible buffer overflow in export_gnutls_datum(). --- dlls/bcrypt/gnutls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c index fa4a0793cda..aeef64fd642 100644 --- a/dlls/bcrypt/gnutls.c +++ b/dlls/bcrypt/gnutls.c @@ -659,7 +659,7 @@ static ULONG export_gnutls_datum( UCHAR *buffer, ULONG buflen, gnutls_datum_t *d size = buflen; } - if (buffer) memcpy( buffer + offset, src, size ); + if (buffer) memcpy( buffer + offset, src, size - offset ); return size; }
1
0
0
0
Hans Leidekker : bcrypt: Pass key size in bytes to EXPORT_SIZE and use the macro consistently.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: cb3cc2b59f47842fa8e46115354d8b4f446d2f5c URL:
https://gitlab.winehq.org/wine/wine/-/commit/cb3cc2b59f47842fa8e46115354d8b…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Mon Nov 14 12:33:56 2022 +0100 bcrypt: Pass key size in bytes to EXPORT_SIZE and use the macro consistently. --- dlls/bcrypt/gnutls.c | 124 ++++++++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 55 deletions(-)
1
0
0
0
Hans Leidekker : bcrypt/tests: Get rid of workarounds for old Windows versions.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: 11cc3ca15122c31fd5545372d749a6dafb0e7c60 URL:
https://gitlab.winehq.org/wine/wine/-/commit/11cc3ca15122c31fd5545372d749a6…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Thu Nov 3 12:04:59 2022 +0100 bcrypt/tests: Get rid of workarounds for old Windows versions. --- dlls/bcrypt/tests/bcrypt.c | 69 ++++++++-------------------------------------- 1 file changed, 11 insertions(+), 58 deletions(-) diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c index 2035ce346e6..1ad9cc3763c 100644 --- a/dlls/bcrypt/tests/bcrypt.c +++ b/dlls/bcrypt/tests/bcrypt.c @@ -1977,12 +1977,7 @@ static void test_key_import_export(void) key = NULL; ret = BCryptImportKey(aes, NULL, BCRYPT_KEY_DATA_BLOB, &key, NULL, 0, buffer1, sizeof(buffer1), 0); - ok(ret == STATUS_SUCCESS || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %#lx\n", ret); - if (ret == STATUS_INVALID_PARAMETER) - { - win_skip("broken BCryptImportKey\n"); - return; - } + ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); ok(key != NULL, "key not set\n"); size = 0; @@ -2076,11 +2071,7 @@ static void test_ECDSA(void) ULONG size; status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0); - if (status) - { - skip("Failed to open ECDSA provider: %#lx, skipping test\n", status); - return; - } + ok(!status, "got %#lx\n", status); ecckey->dwMagic = BCRYPT_ECDSA_PUBLIC_P256_MAGIC; memcpy(ecckey + 1, eccPubkey, sizeof(eccPubkey)); @@ -2406,11 +2397,7 @@ static void test_RSA(void) DWORD keylen; ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0); - if (ret) - { - win_skip("Failed to open RSA provider: %#lx, skipping test\n", ret); - return; - } + ok(!ret, "got %#lx\n", ret); schemes = size = 0; ret = BCryptGetProperty(alg, L"PaddingSchemes", (UCHAR *)&schemes, sizeof(schemes), &size, 0); @@ -2590,11 +2577,7 @@ static void test_RSA_SIGN(void) BYTE *buf, buf2[sizeof(BCRYPT_RSAKEY_BLOB) + sizeof(rsaPublicBlob)]; ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_SIGN_ALGORITHM, NULL, 0); - if (ret) - { - win_skip("Failed to open RSA_SIGN provider: %#lx, skipping test\n", ret); - return; - } + ok(!ret, "got %#lx\n", ret); ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, rsaPublicBlob, sizeof(rsaPublicBlob), 0); ok(!ret, "BCryptImportKeyPair failed: %#lx\n", ret); @@ -2750,11 +2733,7 @@ static void test_ECDH(void) ULONG size; status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0); - if (status) - { - skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %#lx\n", status); - return; - } + ok(status == STATUS_SUCCESS, "got %#lx\n", status); key = NULL; status = BCryptGenerateKeyPair(alg, &key, 256, 0); @@ -2827,15 +2806,12 @@ static void test_ECDH(void) ok(status == STATUS_SUCCESS, "got %#lx\n", status); if (status != STATUS_SUCCESS) goto derive_end; - /* verify result on windows 10 */ status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, NULL, 0, &size, 0); - - if (status == STATUS_NOT_SUPPORTED) + if (status == STATUS_NOT_SUPPORTED) /* < win10 */ { win_skip("BCRYPT_KDF_RAW_SECRET not supported\n"); goto raw_secret_end; } - todo_wine ok(status == STATUS_SUCCESS, "got %#lx\n", status); if (status != STATUS_SUCCESS) goto raw_secret_end; @@ -2964,11 +2940,7 @@ static void test_BCryptSignHash(void) /* RSA */ ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_RSA_ALGORITHM, NULL, 0); - if (ret) - { - win_skip("failed to open RSA provider: %#lx\n", ret); - return; - } + ok(!ret, "got %#lx\n", ret); /* public key */ ret = BCryptImportKeyPair(alg, NULL, BCRYPT_RSAPUBLIC_BLOB, &key, rsapublic, sizeof(rsapublic), 0); @@ -3025,11 +2997,7 @@ static void test_BCryptSignHash(void) /* ECDSA */ ret = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDSA_P256_ALGORITHM, NULL, 0); - if (ret) - { - win_skip("failed to open ECDSA provider: %#lx\n", ret); - return; - } + ok(!ret, "got %#lx\n", ret); ret = BCryptGenerateKeyPair(alg, &key, 256, 0); ok(ret == STATUS_SUCCESS, "got %#lx\n", ret); @@ -3124,13 +3092,7 @@ static void test_aes_vector(void) memcpy(data + sizeof(*blob), secret, sizeof(secret)); size = sizeof(BCRYPT_KEY_DATA_BLOB_HEADER) + sizeof(secret); ret = BCryptImportKey(alg, NULL, BCRYPT_KEY_DATA_BLOB, &key, NULL, 0, data, size, 0); - ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* vista */, "got %#lx\n", ret); - if (ret == STATUS_INVALID_PARAMETER) - { - win_skip("broken BCryptImportKey\n"); - BCryptCloseAlgorithmProvider(alg, 0); - return; - } + ok(!ret, "got %#lx\n", ret); /* zero initialization vector */ size = 0; @@ -3180,12 +3142,7 @@ static void test_BcryptDeriveKeyCapi(void) ok(!ret, "got %#lx\n", ret); ret = BCryptCreateHash(alg, &hash, NULL, 0, NULL, 0, 0); - ok(!ret || broken(ret == STATUS_INVALID_PARAMETER) /* win2k8 */, "got %#lx\n", ret); - if (ret == STATUS_INVALID_PARAMETER) - { - win_skip( "broken BCryptCreateHash\n" ); - return; - } + ok(!ret, "got %#lx\n", ret); ret = BCryptDeriveKeyCapi(NULL, NULL, NULL, 0, 0); ok(ret == STATUS_INVALID_PARAMETER || ret == STATUS_INVALID_HANDLE /* win7 */, "got %#lx\n", ret); @@ -3408,11 +3365,7 @@ static void test_SecretAgreement(void) ULONG size; status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0); - if (status) - { - skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %#lx\n", status); - return; - } + ok(status == STATUS_SUCCESS, "got %#lx\n", status); key = NULL; status = BCryptGenerateKeyPair(alg, &key, 256, 0);
1
0
0
0
Jacek Caban : opengl32: Use default calling convention for WGL driver entry points.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: ecf31ba4c79a6d6926ceb0575bc34bcd263ea0cb URL:
https://gitlab.winehq.org/wine/wine/-/commit/ecf31ba4c79a6d6926ceb0575bc34b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 6 13:39:43 2022 +0100 opengl32: Use default calling convention for WGL driver entry points. --- dlls/opengl32/make_opengl | 14 +++++++------- dlls/opengl32/unix_thunks.c | 20 ++++++++++---------- dlls/win32u/dibdrv/dc.c | 20 ++++++++++---------- dlls/wineandroid.drv/opengl.c | 20 ++++++++++---------- dlls/winemac.drv/opengl.c | 20 ++++++++++---------- dlls/winex11.drv/opengl.c | 22 +++++++++++----------- include/wine/wgl_driver.h | 22 +++++++++++----------- 7 files changed, 69 insertions(+), 69 deletions(-)
1
0
0
0
Gabriel Ivăncescu : mshtml/tests: Accept rare unknown error in ReportResult.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: 60bddb6b7db040e831cfd5686ed72345d91139a0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/60bddb6b7db040e831cfd5686ed723…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Tue Dec 6 17:21:49 2022 +0200 mshtml/tests: Accept rare unknown error in ReportResult. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54087
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> --- dlls/mshtml/tests/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mshtml/tests/events.c b/dlls/mshtml/tests/events.c index a231f9e631c..cd6006805d4 100644 --- a/dlls/mshtml/tests/events.c +++ b/dlls/mshtml/tests/events.c @@ -5051,7 +5051,7 @@ static HRESULT WINAPI Protocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA ok(hres == S_OK, "ReportData failed: %08lx\n", hres); hres = IInternetProtocolSink_ReportResult(This->sink, S_OK, 0, NULL); - ok(hres == S_OK, "ReportResult failed: %08lx\n", hres); + ok(hres == S_OK || broken(hres == 0x80ef0001), "ReportResult failed: %08lx\n", hres); IInternetProtocolEx_Release(&This->IInternetProtocolEx_iface); return S_OK;
1
0
0
0
Hans Leidekker : wldap32/tests: Skip paged search tests when the server can't be reached.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: f21e262491557ac6651c294dcbb6d17a63ee18c7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/f21e262491557ac6651c294dcbb6d1…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Tue Dec 6 16:21:49 2022 +0100 wldap32/tests: Skip paged search tests when the server can't be reached. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54075
--- dlls/wldap32/tests/parse.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/wldap32/tests/parse.c b/dlls/wldap32/tests/parse.c index f30912324ba..8394d5eeeff 100644 --- a/dlls/wldap32/tests/parse.c +++ b/dlls/wldap32/tests/parse.c @@ -242,6 +242,12 @@ static void test_ldap_paged_search(void) count = 0xdeadbeef; res = NULL; ret = ldap_get_next_page_s( ld, search, NULL, 1, &count, &res ); + if (ret == LDAP_SERVER_DOWN || ret == LDAP_UNAVAILABLE) + { + skip( "test server can't be reached\n" ); + ldap_unbind( ld ); + return; + } ok( !ret, "ldap_get_next_page_s failed %#lx\n", ret ); ok( res != NULL, "expected res != NULL\n" ); ok( count == 0, "got %lu\n", count );
1
0
0
0
Jacek Caban : wldap32: Define LDAP_NEEDS_PROTOTYPES.
by Alexandre Julliard
06 Dec '22
06 Dec '22
Module: wine Branch: master Commit: 02e70fcbb0ac25935daadbcb829cb5ae9c6bed8f URL:
https://gitlab.winehq.org/wine/wine/-/commit/02e70fcbb0ac25935daadbcb829cb5…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Dec 6 02:03:24 2022 +0100 wldap32: Define LDAP_NEEDS_PROTOTYPES. Fixes -Wstrict-prototypes warnings in clang builds. --- dlls/wldap32/winldap_private.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/wldap32/winldap_private.h b/dlls/wldap32/winldap_private.h index 2902daea974..47a67968651 100644 --- a/dlls/wldap32/winldap_private.h +++ b/dlls/wldap32/winldap_private.h @@ -23,6 +23,7 @@ #include "winternl.h" #include "winnls.h" +#define LDAP_NEEDS_PROTOTYPES #include <lber.h> #include <ldap.h>
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
54
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
Results per page:
10
25
50
100
200