mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-10 02:42:07 +00:00
Remove unnecessary check for presence of supported EC list
For both client/server the EC curve list is assumed not to be NULL: - On the client-side, it's assumed when writing the supported elliptic curve extension:c54ee936d7/library/ssl_cli.c (L316)
- On the server, it is assumed when searching for a suitable curve for the ECDHE exchange:c54ee936d7/library/ssl_srv.c (L3200)
It is therefore not necessary to check this in mbedtls_ssl_check_curve().
This commit is contained in:
parent
a4a9c696c1
commit
ee24f8cecb
|
@ -11241,9 +11241,6 @@ unsigned char mbedtls_ssl_hash_from_md_alg( int md )
|
||||||
*/
|
*/
|
||||||
int mbedtls_ssl_check_curve( const mbedtls_ssl_context *ssl, mbedtls_ecp_group_id grp_id )
|
int mbedtls_ssl_check_curve( const mbedtls_ssl_context *ssl, mbedtls_ecp_group_id grp_id )
|
||||||
{
|
{
|
||||||
if( ssl->conf->curve_list == NULL )
|
|
||||||
return( -1 );
|
|
||||||
|
|
||||||
MBEDTLS_SSL_BEGIN_FOR_EACH_SUPPORTED_EC_GRP_ID( own_ec_id )
|
MBEDTLS_SSL_BEGIN_FOR_EACH_SUPPORTED_EC_GRP_ID( own_ec_id )
|
||||||
if( own_ec_id == grp_id )
|
if( own_ec_id == grp_id )
|
||||||
return( 0 );
|
return( 0 );
|
||||||
|
|
Loading…
Reference in a new issue