1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-08 17:42:09 +03:00

Use mbedtls_ssl_is_handshake_over()

Switch over to using the new function both internally and in tests.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott
2022-03-18 21:55:32 +00:00
parent 93ba3e3918
commit 27b0d94e25
3 changed files with 23 additions and 23 deletions

View File

@@ -1044,7 +1044,7 @@ int mbedtls_move_handshake_to_state( mbedtls_ssl_context *ssl,
{
/* If /p second_ssl ends the handshake procedure before /p ssl then
* there is no need to call the next step */
if( second_ssl->state != MBEDTLS_SSL_HANDSHAKE_OVER )
if( !mbedtls_ssl_is_handshake_over( second_ssl ) )
{
ret = mbedtls_ssl_handshake_step( second_ssl );
if( ret != 0 && ret != MBEDTLS_ERR_SSL_WANT_READ &&
@@ -2048,8 +2048,8 @@ void perform_handshake( handshake_test_options* options )
goto exit;
}
TEST_ASSERT( client.ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER );
TEST_ASSERT( server.ssl.state == MBEDTLS_SSL_HANDSHAKE_OVER );
TEST_ASSERT( mbedtls_ssl_is_handshake_over( &client.ssl ) == 1 );
TEST_ASSERT( mbedtls_ssl_is_handshake_over( &server.ssl ) == 1 );
/* Check that both sides have negotiated the expected version. */
mbedtls_test_set_step( 0 );