Merge branch 'feature/mbedtls_dynamic_memory_v4.3' into 'release/v4.3'

fix(mbedtls): fix compiling error when open MBEDTLS_SSL_PROTO_DTLS and disable...(backport v4.3)

See merge request espressif/esp-idf!16521
This commit is contained in:
Mahavir Jain 2021-12-23 11:43:45 +00:00
commit da6c5be6c1
2 changed files with 2 additions and 14 deletions

View File

@ -101,6 +101,8 @@ menu "mbedTLS"
bool "Using dynamic TX/RX buffer"
default n
select MBEDTLS_ASYMMETRIC_CONTENT_LEN
# Dynamic buffer feature is not supported with DTLS
depends on !MBEDTLS_SSL_PROTO_DTLS
help
Using dynamic TX/RX buffer. After enabling this option, mbedTLS will
allocate TX buffer when need to send data and then free it if all data

View File

@ -177,20 +177,6 @@ static int ssl_handshake_init( mbedtls_ssl_context *ssl )
ssl_transform_init( ssl->transform_negotiate );
ssl_handshake_params_init( ssl->handshake );
#if defined(MBEDTLS_SSL_PROTO_DTLS)
if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM )
{
ssl->handshake->alt_transform_out = ssl->transform_out;
if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT )
ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_PREPARING;
else
ssl->handshake->retransmit_state = MBEDTLS_SSL_RETRANS_WAITING;
ssl_set_timer( ssl, 0 );
}
#endif
return( 0 );
}