test_suite_ssl: Add missing arguments in endpoint initialization

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-06-10 11:07:39 -04:00
parent 9abad0c5ef
commit 626a931bb9

View File

@ -5525,10 +5525,11 @@ void force_bad_session_id_len( )
TEST_ASSERT( mbedtls_endpoint_init( &client, MBEDTLS_SSL_IS_CLIENT,
&options, NULL, NULL,
NULL ) == 0 );
NULL, NULL ) == 0 );
TEST_ASSERT( mbedtls_endpoint_init( &server, MBEDTLS_SSL_IS_SERVER,
&options, NULL, NULL, NULL ) == 0 );
&options, NULL, NULL, NULL,
NULL ) == 0 );
mbedtls_debug_set_threshold( 1 );
mbedtls_ssl_conf_dbg( &server.conf, options.srv_log_fun,
@ -5669,22 +5670,26 @@ void raw_key_agreement_fail( int bad_server_ecdhe_key )
mbedtls_endpoint client, server;
mbedtls_psa_stats_t stats;
size_t free_slots_before = -1;
handshake_test_options options;
uint16_t iana_tls_group_list[] = { MBEDTLS_SSL_IANA_TLS_GROUP_SECP256R1,
MBEDTLS_SSL_IANA_TLS_GROUP_NONE };
USE_PSA_INIT( );
init_handshake_options( &options );
options.pk_alg = MBEDTLS_PK_ECDSA;
/* Client side, force SECP256R1 to make one key bitflip fail
* the raw key agreement. Flipping the first byte makes the
* required 0x04 identifier invalid. */
TEST_EQUAL( mbedtls_endpoint_init( &client, MBEDTLS_SSL_IS_CLIENT,
MBEDTLS_PK_ECDSA, 0, 0, 0, NULL, NULL,
&options, NULL, NULL,
NULL, iana_tls_group_list ), 0 );
/* Server side */
TEST_EQUAL( mbedtls_endpoint_init( &server, MBEDTLS_SSL_IS_SERVER,
MBEDTLS_PK_ECDSA, 0, 0, 0,
NULL, NULL, NULL, NULL ), 0 );
&options, NULL, NULL,
NULL, NULL ), 0 );
TEST_EQUAL( mbedtls_mock_socket_connect( &(client.socket),
&(server.socket),
@ -5722,6 +5727,7 @@ void raw_key_agreement_fail( int bad_server_ecdhe_key )
exit:
mbedtls_endpoint_free( &client, NULL );
mbedtls_endpoint_free( &server, NULL );
free_handshake_options( &options );
USE_PSA_DONE( );
}