mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-08 17:42:09 +03:00
tests: Set the default conf then customize
Set the default conf then customize, not the other way around. Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
@@ -66,14 +66,12 @@ void debug_print_msg_threshold(int threshold, int level, char *file,
|
||||
memset(buffer.buf, 0, 2000);
|
||||
buffer.ptr = buffer.buf;
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
|
||||
TEST_EQUAL(mbedtls_ssl_config_defaults(&conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM,
|
||||
MBEDTLS_SSL_PRESET_DEFAULT),
|
||||
0);
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
|
||||
|
||||
TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
|
||||
@@ -107,14 +105,12 @@ void mbedtls_debug_print_ret(char *file, int line, char *text, int value,
|
||||
memset(buffer.buf, 0, 2000);
|
||||
buffer.ptr = buffer.buf;
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
|
||||
TEST_EQUAL(mbedtls_ssl_config_defaults(&conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM,
|
||||
MBEDTLS_SSL_PRESET_DEFAULT),
|
||||
0);
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
|
||||
|
||||
TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
|
||||
@@ -145,14 +141,12 @@ void mbedtls_debug_print_buf(char *file, int line, char *text,
|
||||
memset(buffer.buf, 0, 2000);
|
||||
buffer.ptr = buffer.buf;
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
|
||||
TEST_EQUAL(mbedtls_ssl_config_defaults(&conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM,
|
||||
MBEDTLS_SSL_PRESET_DEFAULT),
|
||||
0);
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
|
||||
|
||||
TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
|
||||
@@ -185,14 +179,12 @@ void mbedtls_debug_print_crt(char *crt_file, char *file, int line,
|
||||
memset(buffer.buf, 0, 2000);
|
||||
buffer.ptr = buffer.buf;
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
|
||||
TEST_EQUAL(mbedtls_ssl_config_defaults(&conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM,
|
||||
MBEDTLS_SSL_PRESET_DEFAULT),
|
||||
0);
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
|
||||
|
||||
TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
|
||||
@@ -227,14 +219,12 @@ void mbedtls_debug_print_mpi(char *value, char *file, int line,
|
||||
memset(buffer.buf, 0, 2000);
|
||||
buffer.ptr = buffer.buf;
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
|
||||
TEST_EQUAL(mbedtls_ssl_config_defaults(&conf,
|
||||
MBEDTLS_SSL_IS_CLIENT,
|
||||
MBEDTLS_SSL_TRANSPORT_STREAM,
|
||||
MBEDTLS_SSL_PRESET_DEFAULT),
|
||||
0);
|
||||
|
||||
mbedtls_ssl_conf_rng(&conf, mbedtls_test_random, NULL);
|
||||
mbedtls_ssl_conf_dbg(&conf, string_debug, &buffer);
|
||||
|
||||
TEST_ASSERT(mbedtls_ssl_setup(&ssl, &conf) == 0);
|
||||
|
Reference in New Issue
Block a user