Add entropy safety switch.

Add a switch that turns entropy collecting off entirely, but enables
mbed TLS to run in an entirely unsafe mode. Enables to test mbed TLS
on platforms that don't have their entropy sources integrated yet.
This commit is contained in:
Janos Follath 2016-06-08 15:29:18 +01:00
parent 184eea6aa0
commit 53de78444c
6 changed files with 65 additions and 0 deletions

View file

@ -278,6 +278,29 @@
//#define MBEDTLS_AES_ENCRYPT_ALT
//#define MBEDTLS_AES_DECRYPT_ALT
/**
* \def MBEDTLS_TEST_WO_ENTROPY
*
* Enable testing mbed TLS without access to any entropy. This enables testing
* the library before the platforms entropy sources are integrated (, see for
* example the MBEDTLS_ENTROPY_HARDWARE_ALT or the MBEDTLS_ENTROPY_NV_SEED
* switch).
*
* WARNING! This switch is extremely DANGEROUS, don't use it in production code
* under any circumstances. This switch nullifies any security provided by the
* library.
*/
//#define MBEDTLS_TEST_WO_ENTROPY
/**
* \def MBEDTLS_ENTROPY_NV_SEED
*
* Strong software entropy source. It is not yet implemented,
* adding it because it is mutually exclusive with MBEDTLS_TEST_WO_ENTROPY.
*/
//#define MBEDTLS_ENTROPY_NV_SEED
/**
* \def MBEDTLS_ENTROPY_HARDWARE_ALT
*