1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Move flag indicating presence of strong entropy to test code

This commit is contained in:
Hanno Becker
2017-07-24 12:27:09 +01:00
parent c6deafc0d4
commit 47deec488f
6 changed files with 23 additions and 22 deletions

View File

@ -102,6 +102,21 @@ typedef UINT32 uint32_t;
static int test_errors = 0;
/*----------------------------------------------------------------------------*/
/* Helper flags for complex dependencies */
/* Indicates whether we expect mbedtls_entropy_init
* to initialize some strong entropy source. */
#if defined(MBEDTLS_TEST_NULL_ENTROPY) || \
( !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) && \
( !defined(MBEDTLS_NO_PLATFORM_ENTROPY) || \
defined(MBEDTLS_HAVEGE_C) || \
defined(MBEDTLS_ENTROPY_HARDWARE_ALT) || \
defined(ENTROPY_NV_SEED) ) )
#define MBEDTLS_ENTROPY_HAVE_STRONG
#endif
/*----------------------------------------------------------------------------*/
/* Helper Functions */
@ -401,4 +416,3 @@ static void test_fail( const char *test, int line_no, const char* filename )
mbedtls_fprintf( stdout, " %s\n at line %d, %s\n", test, line_no,
filename );
}