mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 08:25:42 +01:00
Add internal macro ENTROPY_HAVE_STRONG indicating strong entropy
This commit adds the macro ENTROPY_HAVE_STRONG to the helper test file tests/suites/helpers.function to be able to make tests depend on the presence of strong entropy.
This commit is contained in:
parent
276d530abe
commit
66580d284d
@ -60,6 +60,9 @@ void mbedtls_entropy_init( mbedtls_entropy_context *ctx )
|
|||||||
{
|
{
|
||||||
memset( ctx, 0, sizeof(mbedtls_entropy_context) );
|
memset( ctx, 0, sizeof(mbedtls_entropy_context) );
|
||||||
|
|
||||||
|
/* Reminder: Update ENTROPY_HAVE_STRONG in the test files
|
||||||
|
* when adding more strong entropy sources here. */
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
mbedtls_mutex_init( &ctx->mutex );
|
mbedtls_mutex_init( &ctx->mutex );
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,6 +55,18 @@ typedef UINT32 uint32_t;
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* 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) ) )
|
||||||
|
#define ENTROPY_HAVE_STRONG
|
||||||
|
#endif
|
||||||
|
|
||||||
static int unhexify( unsigned char *obuf, const char *ibuf )
|
static int unhexify( unsigned char *obuf, const char *ibuf )
|
||||||
{
|
{
|
||||||
unsigned char c, c2;
|
unsigned char c, c2;
|
||||||
|
Loading…
Reference in New Issue
Block a user