mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-25 06:48:43 +00:00
Omit RSA key generation test if no strong entropy is present
The RSA key generation test needs strong entropy to succeed. This commit captures the presence of a strong entropy source in a preprocessor flag and only runs the key generation test if that flag is set.
This commit is contained in:
@@ -55,6 +55,16 @@
|
||||
#define MBEDTLS_ERR_ENTROPY_NO_STRONG_SOURCE -0x003D /**< No strong sources have been added to poll. */
|
||||
#define MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR -0x003F /**< Read/write error in file. */
|
||||
|
||||
/* Indicates whether at least one standard strong entropy source is enabled. */
|
||||
#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
|
||||
|
||||
/**
|
||||
* \name SECTION: Module settings
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user