diff --git a/library/ssl_misc.h b/library/ssl_misc.h index f53e9ec9d..fe21627c4 100644 --- a/library/ssl_misc.h +++ b/library/ssl_misc.h @@ -2089,7 +2089,7 @@ int mbedtls_ssl_tls13_write_change_cipher_spec(mbedtls_ssl_context *ssl); MBEDTLS_CHECK_RETURN_CRITICAL int mbedtls_ssl_reset_transcript_for_hrr(mbedtls_ssl_context *ssl); -#if defined(MBEDTLS_ECDH_C) +#if defined(MBEDTLS_PK_CAN_ECDH) MBEDTLS_CHECK_RETURN_CRITICAL int mbedtls_ssl_tls13_generate_and_write_ecdh_key_exchange( mbedtls_ssl_context *ssl, diff --git a/library/ssl_tls13_client.c b/library/ssl_tls13_client.c index a7fecedfd..6aae51b8b 100644 --- a/library/ssl_tls13_client.c +++ b/library/ssl_tls13_client.c @@ -184,7 +184,7 @@ static int ssl_tls13_reset_key_share(mbedtls_ssl_context *ssl) return MBEDTLS_ERR_SSL_INTERNAL_ERROR; } -#if defined(MBEDTLS_ECDH_C) +#if defined(MBEDTLS_PK_CAN_ECDH) if (mbedtls_ssl_tls13_named_group_is_ecdhe(group_id)) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; @@ -219,7 +219,7 @@ static int ssl_tls13_get_default_group_id(mbedtls_ssl_context *ssl, int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; -#if defined(MBEDTLS_ECDH_C) +#if defined(MBEDTLS_PK_CAN_ECDH) const uint16_t *group_list = mbedtls_ssl_get_groups(ssl); /* Pick first available ECDHE group compatible with TLS 1.3 */ if (group_list == NULL) { @@ -301,7 +301,7 @@ static int ssl_tls13_write_key_share_ext(mbedtls_ssl_context *ssl, * only one key share entry is allowed. */ client_shares = p; -#if defined(MBEDTLS_ECDH_C) +#if defined(MBEDTLS_PK_CAN_ECDH) if (mbedtls_ssl_tls13_named_group_is_ecdhe(group_id)) { /* Pointer to group */ unsigned char *group = p; diff --git a/library/ssl_tls13_generic.c b/library/ssl_tls13_generic.c index 669a90a9b..a1356e381 100644 --- a/library/ssl_tls13_generic.c +++ b/library/ssl_tls13_generic.c @@ -1428,7 +1428,7 @@ int mbedtls_ssl_reset_transcript_for_hrr(mbedtls_ssl_context *ssl) return ret; } -#if defined(MBEDTLS_ECDH_C) +#if defined(MBEDTLS_PK_CAN_ECDH) int mbedtls_ssl_tls13_read_public_ecdhe_share(mbedtls_ssl_context *ssl, const unsigned char *buf,