mbedtls: Fix build with dynamic buffers feature

This commit is contained in:
Laukik Hase 2023-01-04 17:23:33 +05:30
parent c2ab1af47f
commit 1e4493e592
No known key found for this signature in database
GPG Key ID: 11C571361F51A199
2 changed files with 5 additions and 5 deletions

View File

@ -35,7 +35,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC &&
ssl->handshake->new_session_ticket != 0 )
{
ssl->state = MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET;
ssl->state = MBEDTLS_SSL_NEW_SESSION_TICKET;
}
#endif
@ -158,7 +158,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
#if defined(MBEDTLS_SSL_SESSION_TICKETS)
case MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET:
case MBEDTLS_SSL_NEW_SESSION_TICKET:
if (add) {
CHECK_OK(esp_mbedtls_add_rx_buffer(ssl));
} else {

View File

@ -49,7 +49,7 @@ static void ssl_update_checksum_start( mbedtls_ssl_context *ssl,
mbedtls_sha256_update( &ssl->handshake->fin_sha256, buf, len );
#endif
#if defined(MBEDTLS_SHA512_C)
mbedtls_sha512_update( &ssl->handshake->fin_sha512, buf, len );
mbedtls_sha512_update( &ssl->handshake->fin_sha384, buf, len );
#endif
}
@ -62,8 +62,8 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
mbedtls_sha256_starts( &handshake->fin_sha256, 0 );
#endif
#if defined(MBEDTLS_SHA512_C)
mbedtls_sha512_init( &handshake->fin_sha512 );
mbedtls_sha512_starts( &handshake->fin_sha512, 1 );
mbedtls_sha512_init( &handshake->fin_sha384 );
mbedtls_sha512_starts( &handshake->fin_sha384, 1 );
#endif
handshake->update_checksum = ssl_update_checksum_start;