mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-27 05:21:00 +00:00
Add internal macro ENTROPY_HAVE_DEFAULT indicating default entropy
This commit adds the macro ENTROPY_HAVE_DEFAULT to the helper test file tests/suites/helpers.function to be able to make tests depend on the presence of a default entropy source.
This commit is contained in:
parent
cffe2daf25
commit
adb9bd23d9
|
@ -61,6 +61,9 @@ void entropy_init( entropy_context *ctx )
|
|||
{
|
||||
memset( ctx, 0, sizeof(entropy_context) );
|
||||
|
||||
/* Reminder: Update ENTROPY_HAVE_DEFAULT in the test files
|
||||
* when adding more strong entropy sources here. */
|
||||
|
||||
#if defined(POLARSSL_THREADING_C)
|
||||
polarssl_mutex_init( &ctx->mutex );
|
||||
#endif
|
||||
|
|
|
@ -53,6 +53,17 @@ typedef UINT32 uint32_t;
|
|||
}
|
||||
#endif
|
||||
|
||||
/* Helper flags for complex dependencies */
|
||||
|
||||
/* Indicates whether we expect mbedtls_entropy_init
|
||||
* to initialize some strong entropy source. */
|
||||
#if !defined(POLARSSL_NO_DEFAULT_ENTROPY_SOURCES) && \
|
||||
( !defined(POLARSSL_NO_PLATFORM_ENTROPY) || \
|
||||
defined(POLARSSL_HAVEGE_C) || \
|
||||
defined(POLARSSL_TIMING_C) )
|
||||
#define ENTROPY_HAVE_DEFAULT
|
||||
#endif
|
||||
|
||||
static int unhexify( unsigned char *obuf, const char *ibuf )
|
||||
{
|
||||
unsigned char c, c2;
|
||||
|
|
Loading…
Reference in a new issue