mirror of
https://github.com/ARMmbed/mbedtls.git
synced 2025-06-25 14:51:26 +08:00
Reduce the level of logging used in tests
This should avoid running into a bug with printf format specifiers one windows. It's also a logical move for actual tests: I used the highest debug level for discovery, but we don't need that all the time. Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
55d9124bb0
commit
1038b22d74
@ -91,7 +91,7 @@ static void ssl_tls13_select_ciphersuite(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MBEDTLS_SSL_DEBUG_MSG(2, ("No matched ciphersuite, psk_ciphersuite_id=%x, psk_hash_alg=%lx",
|
MBEDTLS_SSL_DEBUG_MSG(1, ("No matched ciphersuite, psk_ciphersuite_id=%x, psk_hash_alg=%lx",
|
||||||
(unsigned) psk_ciphersuite_id,
|
(unsigned) psk_ciphersuite_id,
|
||||||
(unsigned long) psk_hash_alg));
|
(unsigned long) psk_hash_alg));
|
||||||
}
|
}
|
||||||
|
@ -5046,7 +5046,7 @@ void inject_client_content_on_the_wire(int pk_alg,
|
|||||||
srv_pattern.pattern = log_pattern;
|
srv_pattern.pattern = log_pattern;
|
||||||
options.srv_log_obj = &srv_pattern;
|
options.srv_log_obj = &srv_pattern;
|
||||||
options.srv_log_fun = mbedtls_test_ssl_log_analyzer;
|
options.srv_log_fun = mbedtls_test_ssl_log_analyzer;
|
||||||
mbedtls_debug_set_threshold(5);
|
mbedtls_debug_set_threshold(1);
|
||||||
|
|
||||||
options.pk_alg = pk_alg;
|
options.pk_alg = pk_alg;
|
||||||
|
|
||||||
@ -5078,7 +5078,11 @@ void inject_client_content_on_the_wire(int pk_alg,
|
|||||||
ret = mbedtls_ssl_handshake_step(&server.ssl);
|
ret = mbedtls_ssl_handshake_step(&server.ssl);
|
||||||
} while (ret == 0 && server.ssl.state == state);
|
} while (ret == 0 && server.ssl.state == state);
|
||||||
TEST_EQUAL(ret, expected_ret);
|
TEST_EQUAL(ret, expected_ret);
|
||||||
|
/* If we're expected to suceeed and we do, that's enough.
|
||||||
|
* If we're expected to fail, also check it was in the expected way. */
|
||||||
|
if (expected_ret != 0) {
|
||||||
TEST_EQUAL(srv_pattern.counter, 1);
|
TEST_EQUAL(srv_pattern.counter, 1);
|
||||||
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
mbedtls_test_free_handshake_options(&options);
|
mbedtls_test_free_handshake_options(&options);
|
||||||
@ -5123,7 +5127,7 @@ void send_large_fragmented_hello(int hs_len_int, int first_frag_content_len_int,
|
|||||||
srv_pattern.pattern = log_pattern;
|
srv_pattern.pattern = log_pattern;
|
||||||
options.srv_log_obj = &srv_pattern;
|
options.srv_log_obj = &srv_pattern;
|
||||||
options.srv_log_fun = mbedtls_test_ssl_log_analyzer;
|
options.srv_log_fun = mbedtls_test_ssl_log_analyzer;
|
||||||
mbedtls_debug_set_threshold(5);
|
mbedtls_debug_set_threshold(1);
|
||||||
|
|
||||||
// Does't really matter but we want to know to declare dependencies.
|
// Does't really matter but we want to know to declare dependencies.
|
||||||
options.pk_alg = MBEDTLS_PK_ECDSA;
|
options.pk_alg = MBEDTLS_PK_ECDSA;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user