diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-07-02 03:06:52 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-07-02 12:36:27 +0200 |
commit | 564d93ff10b19dd15df6ea049bd7c9a9c99680c6 (patch) | |
tree | ee6523844280ff5874e8d7aff7c95f498ae769e0 /modules/mbedtls | |
parent | 0268a4869ded42079d3f4c255406711c726e3df4 (diff) |
CryptoCore class to access to base crypto utils.
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.
To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.
If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.
Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
Diffstat (limited to 'modules/mbedtls')
-rwxr-xr-x | modules/mbedtls/stream_peer_mbed_tls.cpp | 2 | ||||
-rwxr-xr-x | modules/mbedtls/stream_peer_mbed_tls.h | 1 |
2 files changed, 0 insertions, 3 deletions
diff --git a/modules/mbedtls/stream_peer_mbed_tls.cpp b/modules/mbedtls/stream_peer_mbed_tls.cpp index 3541eff25a..4bb7557150 100755 --- a/modules/mbedtls/stream_peer_mbed_tls.cpp +++ b/modules/mbedtls/stream_peer_mbed_tls.cpp @@ -33,8 +33,6 @@ #include "core/io/stream_peer_tcp.h" #include "core/os/file_access.h" -#include <mbedtls/platform_util.h> - static void my_debug(void *ctx, int level, const char *file, int line, const char *str) { diff --git a/modules/mbedtls/stream_peer_mbed_tls.h b/modules/mbedtls/stream_peer_mbed_tls.h index 3ddbea3ce4..ab87b779c1 100755 --- a/modules/mbedtls/stream_peer_mbed_tls.h +++ b/modules/mbedtls/stream_peer_mbed_tls.h @@ -37,7 +37,6 @@ #include <mbedtls/ctr_drbg.h> #include <mbedtls/debug.h> #include <mbedtls/entropy.h> -#include <mbedtls/net.h> #include <mbedtls/ssl.h> #include <stdio.h> |