mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01: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:
parent
3f77dfbd52
commit
7580ba475d
5 changed files with 47 additions and 19 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue