mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-25 18:39:54 +00:00
fix test_ref_configs build fail
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
1753261083
commit
1ea9d10687
@ -1753,12 +1753,16 @@ static inline int mbedtls_ssl_tls13_named_group_is_dhe( uint16_t named_group )
|
|||||||
named_group <= MBEDTLS_SSL_IANA_TLS_GROUP_FFDHE8192 );
|
named_group <= MBEDTLS_SSL_IANA_TLS_GROUP_FFDHE8192 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) || \
|
||||||
|
defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||||
int mbedtls_ssl_write_supported_groups_ext( mbedtls_ssl_context *ssl,
|
int mbedtls_ssl_write_supported_groups_ext( mbedtls_ssl_context *ssl,
|
||||||
unsigned char *buf,
|
unsigned char *buf,
|
||||||
const unsigned char *end,
|
const unsigned char *end,
|
||||||
size_t *out_len );
|
size_t *out_len );
|
||||||
|
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED ||
|
||||||
|
MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C ||
|
||||||
|
MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
|
||||||
|
|
||||||
#endif /* ssl_misc.h */
|
#endif /* ssl_misc.h */
|
||||||
|
@ -7189,7 +7189,9 @@ int mbedtls_ssl_get_handshake_transcript( mbedtls_ssl_context *ssl,
|
|||||||
}
|
}
|
||||||
#endif /* !MBEDTLS_USE_PSA_CRYPTO */
|
#endif /* !MBEDTLS_USE_PSA_CRYPTO */
|
||||||
|
|
||||||
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED)
|
#if defined(MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED) || \
|
||||||
|
defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \
|
||||||
|
defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED)
|
||||||
/*
|
/*
|
||||||
* Functions for writing supported_groups extension.
|
* Functions for writing supported_groups extension.
|
||||||
*
|
*
|
||||||
@ -7214,7 +7216,7 @@ int mbedtls_ssl_get_handshake_transcript( mbedtls_ssl_context *ssl,
|
|||||||
static int ssl_check_group_type( const mbedtls_ssl_config *conf,
|
static int ssl_check_group_type( const mbedtls_ssl_config *conf,
|
||||||
const uint16_t group )
|
const uint16_t group )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_ECDH_C)
|
#if defined(MBEDTLS_ECP_C)
|
||||||
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
#if defined(MBEDTLS_SSL_PROTO_TLS1_2)
|
||||||
if( mbedtls_ssl_conf_is_tls12_only( conf )
|
if( mbedtls_ssl_conf_is_tls12_only( conf )
|
||||||
&& mbedtls_ssl_named_group_is_ecdhe( group ) )
|
&& mbedtls_ssl_named_group_is_ecdhe( group ) )
|
||||||
@ -7226,8 +7228,10 @@ static int ssl_check_group_type( const mbedtls_ssl_config *conf,
|
|||||||
&& mbedtls_ssl_tls13_named_group_is_ecdhe( group ) )
|
&& mbedtls_ssl_tls13_named_group_is_ecdhe( group ) )
|
||||||
return( SSL_GROUP_IS_ECDHE );
|
return( SSL_GROUP_IS_ECDHE );
|
||||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
|
||||||
|
#else
|
||||||
|
((void) conf);
|
||||||
#endif /* MBEDTLS_ECDH_C */
|
#endif /* MBEDTLS_ECDH_C */
|
||||||
|
|
||||||
if( mbedtls_ssl_tls13_named_group_is_dhe( group ) )
|
if( mbedtls_ssl_tls13_named_group_is_dhe( group ) )
|
||||||
return( SSL_GROUP_IS_DHE );
|
return( SSL_GROUP_IS_DHE );
|
||||||
|
|
||||||
@ -7267,10 +7271,12 @@ int mbedtls_ssl_write_supported_groups_ext( mbedtls_ssl_context *ssl,
|
|||||||
|
|
||||||
for ( ; *group_list != 0; group_list++ )
|
for ( ; *group_list != 0; group_list++ )
|
||||||
{
|
{
|
||||||
|
MBEDTLS_SSL_DEBUG_MSG( 1, ("got supported group(%04x)",*group_list));
|
||||||
int group_type = ssl_check_group_type( ssl->conf, *group_list );
|
int group_type = ssl_check_group_type( ssl->conf, *group_list );
|
||||||
if( group_type == SSL_GROUP_IS_UNSUPPORTED )
|
if( group_type == SSL_GROUP_IS_UNSUPPORTED )
|
||||||
continue;
|
continue;
|
||||||
#if defined(MBEDTLS_ECDH_C)
|
MBEDTLS_SSL_DEBUG_MSG( 1, ("add supported group(%04x)",*group_list));
|
||||||
|
#if defined(MBEDTLS_ECP_C)
|
||||||
if( group_type == SSL_GROUP_IS_ECDHE )
|
if( group_type == SSL_GROUP_IS_ECDHE )
|
||||||
{
|
{
|
||||||
const mbedtls_ecp_curve_info *curve_info;
|
const mbedtls_ecp_curve_info *curve_info;
|
||||||
@ -7320,6 +7326,8 @@ int mbedtls_ssl_write_supported_groups_ext( mbedtls_ssl_context *ssl,
|
|||||||
return( 0 );
|
return( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED */
|
#endif /* MBEDTLS_KEY_EXCHANGE_WITH_CERT_ENABLED ||
|
||||||
|
MBEDTLS_ECDH_C || MBEDTLS_ECDSA_C ||
|
||||||
|
MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */
|
||||||
|
|
||||||
#endif /* MBEDTLS_SSL_TLS_C */
|
#endif /* MBEDTLS_SSL_TLS_C */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user