Add handshake version test

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2022-05-26 10:43:30 +08:00
parent b3d86de3ea
commit df0a71a0b0
2 changed files with 15 additions and 0 deletions

View file

@ -2099,6 +2099,17 @@ void perform_handshake( handshake_test_options* options )
}
TEST_ASSERT( mbedtls_ssl_is_handshake_over( &client.ssl ) == 1 );
/* Workaround for TLS1.3 */
TEST_ASSERT( mbedtls_move_handshake_to_state( &(server.ssl),
&(client.ssl),
MBEDTLS_SSL_HANDSHAKE_OVER )
== expected_handshake_result );
if( expected_handshake_result != 0 )
{
goto exit;
}
TEST_ASSERT( mbedtls_ssl_is_handshake_over( &server.ssl ) == 1 );
/* Check that both sides have negotiated the expected version. */