diff options
Diffstat (limited to 'thirdparty/mbedtls')
-rw-r--r-- | thirdparty/mbedtls/include/godot_core_mbedtls_config.h | 13 | ||||
-rw-r--r-- | thirdparty/mbedtls/library/godot_core_mbedtls_platform.c | 18 |
2 files changed, 31 insertions, 0 deletions
diff --git a/thirdparty/mbedtls/include/godot_core_mbedtls_config.h b/thirdparty/mbedtls/include/godot_core_mbedtls_config.h new file mode 100644 index 0000000000..0e90a98886 --- /dev/null +++ b/thirdparty/mbedtls/include/godot_core_mbedtls_config.h @@ -0,0 +1,13 @@ +// For AES +#define MBEDTLS_CIPHER_MODE_CBC +#define MBEDTLS_CIPHER_MODE_CFB +#define MBEDTLS_CIPHER_MODE_CTR +#define MBEDTLS_CIPHER_MODE_OFB +#define MBEDTLS_CIPHER_MODE_XTS + +#define MBEDTLS_AES_C +#define MBEDTLS_BASE64_C +#define MBEDTLS_MD5_C +#define MBEDTLS_SHA1_C +#define MBEDTLS_SHA256_C +#define MBEDTLS_PLATFORM_ZEROIZE_ALT diff --git a/thirdparty/mbedtls/library/godot_core_mbedtls_platform.c b/thirdparty/mbedtls/library/godot_core_mbedtls_platform.c new file mode 100644 index 0000000000..9018726072 --- /dev/null +++ b/thirdparty/mbedtls/library/godot_core_mbedtls_platform.c @@ -0,0 +1,18 @@ +#if !defined(MBEDTLS_CONFIG_FILE) +#include "mbedtls/config.h" +#else +#include MBEDTLS_CONFIG_FILE +#endif + +#include <stdio.h> +#include <string.h> +#include <stddef.h> + +#ifdef MBEDTLS_PLATFORM_ZEROIZE_ALT +static void *(*const volatile memset_func)(void *, int, size_t) = memset; + +void mbedtls_platform_zeroize(void *buf, size_t len) { + memset_func( buf, 0, len ); +} +#endif + |