mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-03 02:54:01 +00:00
ssl_server2: don't check test hooks failure in query_config mode
Test hook failure checks may print information to stdout, which messes up the usage of query_config mode. Nothing interesting happens in query_config mode anyway, so that's no loss. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
53dea743d5
commit
d0a46e5c7f
@ -4000,11 +4000,17 @@ exit:
|
|||||||
mbedtls_free( context_buf );
|
mbedtls_free( context_buf );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( test_hooks_failure_detected( ) )
|
/* Let test hooks detect errors such as resource leaks.
|
||||||
|
* Don't do it in query_config mode, because some test code prints
|
||||||
|
* information to stdout and this gets mixed with the regular output. */
|
||||||
|
if( opt.query_config_mode == DFL_QUERY_CONFIG_MODE )
|
||||||
{
|
{
|
||||||
if( ret == 0 )
|
if( test_hooks_failure_detected( ) )
|
||||||
ret = 1;
|
{
|
||||||
mbedtls_printf( "Test hooks detected errors.\n" );
|
if( ret == 0 )
|
||||||
|
ret = 1;
|
||||||
|
mbedtls_printf( "Test hooks detected errors.\n" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
test_hooks_free( );
|
test_hooks_free( );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user