Fix define for ssl_conf_curves()
This is a security feature, it shouldn't be optional.
This commit is contained in:
parent
6e3ee3ad43
commit
b541da6ef3
9 changed files with 14 additions and 35 deletions
|
@ -255,7 +255,7 @@ static void ssl_write_supported_elliptic_curves_ext( mbedtls_ssl_context *ssl,
|
|||
unsigned char *elliptic_curve_list = p + 6;
|
||||
size_t elliptic_curve_len = 0;
|
||||
const mbedtls_ecp_curve_info *info;
|
||||
#if defined(MBEDTLS_SSL_SET_CURVES)
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
const mbedtls_ecp_group_id *grp_id;
|
||||
#else
|
||||
((void) ssl);
|
||||
|
@ -265,7 +265,7 @@ static void ssl_write_supported_elliptic_curves_ext( mbedtls_ssl_context *ssl,
|
|||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, adding supported_elliptic_curves extension" ) );
|
||||
|
||||
#if defined(MBEDTLS_SSL_SET_CURVES)
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
for( grp_id = ssl->conf->curve_list; *grp_id != MBEDTLS_ECP_DP_NONE; grp_id++ )
|
||||
{
|
||||
info = mbedtls_ecp_curve_info_from_grp_id( *grp_id );
|
||||
|
@ -1683,7 +1683,7 @@ static int ssl_check_server_ecdh_params( const mbedtls_ssl_context *ssl )
|
|||
|
||||
MBEDTLS_SSL_DEBUG_MSG( 2, ( "ECDH curve: %s", curve_info->name ) );
|
||||
|
||||
#if defined(MBEDTLS_SSL_SET_CURVES)
|
||||
#if defined(MBEDTLS_ECP_C)
|
||||
if( ! mbedtls_ssl_curve_is_acceptable( ssl, ssl->handshake->ecdh_ctx.grp.id ) )
|
||||
#else
|
||||
if( ssl->handshake->ecdh_ctx.grp.nbits < 163 ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue