Make entropy bias self test poll multiple times

Instead of polling the hardware entropy source a single time and
comparing the output with itself, the source is polled at least twice
and make sure that the separate outputs are different.
This commit is contained in:
Andres AG 2016-08-25 10:18:50 +01:00 committed by Simon Butcher
parent b34e42e69e
commit e7723ec284
4 changed files with 72 additions and 66 deletions

View file

@ -381,8 +381,5 @@ void entropy_nv_seed( char *read_seed_str )
void entropy_selftest( )
{
TEST_ASSERT( mbedtls_entropy_self_test( 0 ) == 0 );
#if !defined(MBEDTLS_TEST_NULL_ENTROPY) && defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
TEST_ASSERT( mbedtls_entropy_self_test_bias( 0 ) == 0 );
#endif
}
/* END_CASE */