1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

Add MBEDTLS_ENTROPY_HARDWARE_ALT

Makes it easier for an external module to plug its hardware entropy collector.
This commit is contained in:
Manuel Pégourié-Gonnard
2015-06-19 10:06:21 +02:00
parent bf82ff0209
commit 3f77dfbd52
3 changed files with 31 additions and 0 deletions

View File

@ -86,6 +86,10 @@ void mbedtls_entropy_init( mbedtls_entropy_context *ctx )
mbedtls_entropy_add_source( ctx, mbedtls_havege_poll, &ctx->havege_data,
MBEDTLS_ENTROPY_MIN_HAVEGE );
#endif
#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT)
mbedtls_entropy_add_source( ctx, mbedtls_hardware_poll, NULL
MBEDTLS_ENTROPY_MIN_HARDWARE );
#endif
#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */
}