Relax timing_self_test for windows idiosyncrasies

This commit is contained in:
Manuel Pégourié-Gonnard 2015-08-18 20:11:48 +02:00
parent 04b7eec539
commit e578b1c79a

View File

@ -414,7 +414,9 @@ int mbedtls_timing_self_test( int verbose )
millisecs = mbedtls_timing_get_timer( &hires, 0 );
if( millisecs < 900 * secs || millisecs > 1100 * secs )
/* For some reason on Windows it looks like alarm has an extra delay
* (maybe related to creating a new thread). Allow some room here. */
if( millisecs < 800 * secs || millisecs > 1200 * secs + 300 )
{
if( verbose != 0 )
mbedtls_printf( "failed\n" );