summaryrefslogtreecommitdiff
path: root/thirdparty/mbedtls
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-02-08 10:34:43 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-02-14 10:45:50 +0100
commitee7b67e13538bf67a1613650986d4520281808df (patch)
tree005da0285d3e50b6f42f7ec6096f2aa020ca6e80 /thirdparty/mbedtls
parent6b5634b96aa90ab2db7357b353fc8f96ad4878c5 (diff)
[Crypto] Implement CryptoCore::RandomGenerator.
As a cryptographically secure random generator. Internally it uses mbedTLS CTR-DRBG implementation which gets re-seeded with entropy from OS::get_entropy when needed. CryptoCore now additionally depends on `ctr_drbg.c` and `entropy.c` thirdparty mbedtls files.
Diffstat (limited to 'thirdparty/mbedtls')
-rw-r--r--thirdparty/mbedtls/include/godot_core_mbedtls_config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/thirdparty/mbedtls/include/godot_core_mbedtls_config.h b/thirdparty/mbedtls/include/godot_core_mbedtls_config.h
index 0e90a98886..9e7b2742a7 100644
--- a/thirdparty/mbedtls/include/godot_core_mbedtls_config.h
+++ b/thirdparty/mbedtls/include/godot_core_mbedtls_config.h
@@ -7,7 +7,12 @@
#define MBEDTLS_AES_C
#define MBEDTLS_BASE64_C
+#define MBEDTLS_CTR_DRBG_C
+#define MBEDTLS_ENTROPY_C
#define MBEDTLS_MD5_C
#define MBEDTLS_SHA1_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_PLATFORM_ZEROIZE_ALT
+#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
+
+#include <limits.h>