From 7ae3026d5d9e119c840d9145736037cf4136d578 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Wed, 10 Jul 2019 09:40:52 +0100 Subject: [PATCH] [Fixup] Minor changes addressing review feedback --- include/mbedtls/config.h | 6 +++--- include/mbedtls/ssl_internal.h | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 9443c92a7..4d3ccb981 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -3652,13 +3652,13 @@ */ //#define MBEDTLS_SSL_CONF_SINGLE_CIPHERSUITE MBEDTLS_SUITE_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 -/* Enable support a single elliptic curve fixed +/* Enable support of a single elliptic curve fixed * at compile-time, at the benefit of code-size. * - * On highly constrained systems which large control + * On highly constrained systems with large control * over the configuration of the connection endpoints, * this option can be used to hardcode the choice of - * a single elliptic curve to use for all elliptic + * a single elliptic curve to be used for all elliptic * curve operations during the handshake. * * If this is set, you must also define the following: diff --git a/include/mbedtls/ssl_internal.h b/include/mbedtls/ssl_internal.h index 9259955ca..91d52e75d 100644 --- a/include/mbedtls/ssl_internal.h +++ b/include/mbedtls/ssl_internal.h @@ -1486,18 +1486,18 @@ static inline unsigned int mbedtls_ssl_conf_get_ems_enforced( #if !defined(MBEDTLS_SSL_CONF_SINGLE_EC) -#define MBEDTLS_SSL_BEGIN_FOR_EACH_SUPPORTED_EC_TLS_ID( TLS_ID_VAR ) \ - { \ - mbedtls_ecp_group_id const *__gid; \ - mbedtls_ecp_curve_info const *__info; \ - for( __gid = ssl->conf->curve_list; \ - *__gid != MBEDTLS_ECP_DP_NONE; __gid++ ) \ - { \ - uint16_t TLS_ID_VAR; \ - __info = mbedtls_ecp_curve_info_from_grp_id( *__gid ); \ - if( __info == NULL ) \ - continue; \ - TLS_ID_VAR = __info->tls_id; +#define MBEDTLS_SSL_BEGIN_FOR_EACH_SUPPORTED_EC_TLS_ID( TLS_ID_VAR ) \ + { \ + mbedtls_ecp_group_id const *_gid; \ + mbedtls_ecp_curve_info const *_info; \ + for( _gid = ssl->conf->curve_list; \ + *_gid != MBEDTLS_ECP_DP_NONE; _gid++ ) \ + { \ + uint16_t TLS_ID_VAR; \ + _info = mbedtls_ecp_curve_info_from_grp_id( *_gid ) ; \ + if( _info == NULL ) \ + continue; \ + TLS_ID_VAR = _info->tls_id; #define MBEDTLS_SSL_END_FOR_EACH_SUPPORTED_EC_TLS_ID \ } \ @@ -1505,11 +1505,11 @@ static inline unsigned int mbedtls_ssl_conf_get_ems_enforced( #define MBEDTLS_SSL_BEGIN_FOR_EACH_SUPPORTED_EC_GRP_ID( EC_ID_VAR ) \ { \ - mbedtls_ecp_group_id const *__gid; \ - for( __gid = ssl->conf->curve_list; \ - *__gid != MBEDTLS_ECP_DP_NONE; __gid++ ) \ + mbedtls_ecp_group_id const *_gid; \ + for( _gid = ssl->conf->curve_list; \ + *_gid != MBEDTLS_ECP_DP_NONE; _gid++ ) \ { \ - mbedtls_ecp_group_id EC_ID_VAR = *__gid; \ + mbedtls_ecp_group_id EC_ID_VAR = *_gid; \ #define MBEDTLS_SSL_END_FOR_EACH_SUPPORTED_EC_GRP_ID \ } \