mbedtls: Fix build with dynamic buffers feature

This commit is contained in:
Laukik Hase
2023-01-04 17:23:33 +05:30
committed by Mahavir Jain
parent 6384299167
commit db99f311fc
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 && if( ssl->state == MBEDTLS_SSL_SERVER_CHANGE_CIPHER_SPEC &&
ssl->handshake->new_session_ticket != 0 ) ssl->handshake->new_session_ticket != 0 )
{ {
ssl->state = MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET; ssl->state = MBEDTLS_SSL_NEW_SESSION_TICKET;
} }
#endif #endif
@ -156,7 +156,7 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
#if defined(MBEDTLS_SSL_SESSION_TICKETS) #if defined(MBEDTLS_SSL_SESSION_TICKETS)
case MBEDTLS_SSL_SERVER_NEW_SESSION_TICKET: case MBEDTLS_SSL_NEW_SESSION_TICKET:
if (add) { if (add) {
CHECK_OK(esp_mbedtls_add_rx_buffer(ssl)); CHECK_OK(esp_mbedtls_add_rx_buffer(ssl));
} else { } 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 ); mbedtls_sha256_update( &ssl->handshake->fin_sha256, buf, len );
#endif #endif
#if defined(MBEDTLS_SHA512_C) #if defined(MBEDTLS_SHA512_C)
mbedtls_sha512_update( &ssl->handshake->fin_sha512, buf, len ); mbedtls_sha512_update( &ssl->handshake->fin_sha384, buf, len );
#endif #endif
} }
@ -62,8 +62,8 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake )
mbedtls_sha256_starts( &handshake->fin_sha256, 0 ); mbedtls_sha256_starts( &handshake->fin_sha256, 0 );
#endif #endif
#if defined(MBEDTLS_SHA512_C) #if defined(MBEDTLS_SHA512_C)
mbedtls_sha512_init( &handshake->fin_sha512 ); mbedtls_sha512_init( &handshake->fin_sha384 );
mbedtls_sha512_starts( &handshake->fin_sha512, 1 ); mbedtls_sha512_starts( &handshake->fin_sha384, 1 );
#endif #endif
handshake->update_checksum = ssl_update_checksum_start; handshake->update_checksum = ssl_update_checksum_start;