mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 17:55:42 +01:00
Do no test net_usleep in timing_selftest
Timing belongs in libcrypto (due to havege depending on it) while net.c was put in libtls (only test ssl servers use it)
This commit is contained in:
parent
53585eeb17
commit
cde2aba0af
@ -355,11 +355,6 @@ int mbedtls_timing_get_delay( void *data )
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
/* To test mbedtls_net_usleep against our functions */
|
||||
#if defined(MBEDTLS_NET_C)
|
||||
#include "mbedtls/net.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Busy-waits for the given number of milliseconds.
|
||||
* Used for testing mbedtls_timing_hardclock.
|
||||
@ -511,31 +506,6 @@ hard_test:
|
||||
if( verbose != 0 )
|
||||
mbedtls_printf( "passed\n" );
|
||||
|
||||
#if defined(MBEDTLS_NET_C)
|
||||
if( verbose != 0 )
|
||||
mbedtls_printf( " TIMING test #4 (net_usleep/ get_timer): " );
|
||||
|
||||
for( secs = 1; secs <= 3; secs++ )
|
||||
{
|
||||
(void) mbedtls_timing_get_timer( &hires, 1 );
|
||||
|
||||
mbedtls_net_usleep( 500000 * secs );
|
||||
|
||||
millisecs = mbedtls_timing_get_timer( &hires, 0 );
|
||||
|
||||
if( millisecs < 450 * secs || millisecs > 550 * secs )
|
||||
{
|
||||
if( verbose != 0 )
|
||||
mbedtls_printf( "failed\n" );
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
if( verbose != 0 )
|
||||
mbedtls_printf( "passed\n" );
|
||||
#endif /* MBEDTLS_NET_C */
|
||||
|
||||
if( verbose != 0 )
|
||||
mbedtls_printf( "\n" );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user