Add a concept of entropy source strength.
The main goal is, we want and error if cycle counter is the only source.
diff --git a/programs/pkey/gen_key.c b/programs/pkey/gen_key.c
index 13d23fc..a58a80e 100644
--- a/programs/pkey/gen_key.c
+++ b/programs/pkey/gen_key.c
@@ -286,7 +286,8 @@
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;