mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-12-24 17:41:01 +03:00
Add a concept of entropy source strength.
The main goal is, we want and error if cycle counter is the only source.
This commit is contained in:
@@ -286,7 +286,8 @@ int main( int argc, char *argv[] )
|
||||
if( opt.use_dev_random )
|
||||
{
|
||||
if( ( ret = mbedtls_entropy_add_source( &entropy, dev_random_entropy_poll,
|
||||
NULL, DEV_RANDOM_THRESHOLD ) ) != 0 )
|
||||
NULL, DEV_RANDOM_THRESHOLD,
|
||||
MBEDTLS_ENTROPY_SOURCE_STRONG ) ) != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! mbedtls_entropy_add_source returned -0x%04x\n", -ret );
|
||||
goto exit;
|
||||
|
||||
Reference in New Issue
Block a user