Skip to content

Commit c2746ea

Browse files
Fix entropy_calls when MBEDTLS_ENTROPY_NV_SEED is enabled
1 parent 85485c7 commit c2746ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/suites/test_suite_entropy.function

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ void entropy_calls( int strength1, int strength2,
312312
&dummy2, threshold,
313313
strength2 ) == 0 );
314314

315+
#if defined(MBEDTLS_ENTROPY_NV_SEED)
316+
/* If the NV seed functionality is enabled, there are two entropy
317+
* updates: before and after updating the NV seed. */
318+
if( result >= 0 )
319+
result *= 2;
320+
#endif
321+
315322
ret = mbedtls_entropy_func( &ctx, buf, sizeof( buf ) );
316323

317324
if( result >= 0 )

0 commit comments

Comments
 (0)