Move CryptoCore to it's own folder.

Crypto classes will be placed in core/crypto.
This commit is contained in:
Fabio Alessandrelli 2019-07-11 15:21:47 +02:00
parent 5cb41faece
commit c19871af6d
13 changed files with 11 additions and 41 deletions

View File

@ -159,6 +159,7 @@ env.CommandNoCache('#core/license.gen.h', ["../COPYRIGHT.txt", "../LICENSE.txt"]
# Chain load SCsubs # Chain load SCsubs
SConscript('os/SCsub') SConscript('os/SCsub')
SConscript('math/SCsub') SConscript('math/SCsub')
SConscript('crypto/SCsub')
SConscript('io/SCsub') SConscript('io/SCsub')
SConscript('bind/SCsub') SConscript('bind/SCsub')

View File

@ -30,11 +30,11 @@
#include "core_bind.h" #include "core_bind.h"
#include "core/crypto/crypto_core.h"
#include "core/io/file_access_compressed.h" #include "core/io/file_access_compressed.h"
#include "core/io/file_access_encrypted.h" #include "core/io/file_access_encrypted.h"
#include "core/io/json.h" #include "core/io/json.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/math/crypto_core.h"
#include "core/math/geometry.h" #include "core/math/geometry.h"
#include "core/os/keyboard.h" #include "core/os/keyboard.h"
#include "core/os/os.h" #include "core/os/os.h"

View File

@ -30,7 +30,7 @@
#include "file_access_encrypted.h" #include "file_access_encrypted.h"
#include "core/math/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/os/copymem.h" #include "core/os/copymem.h"
#include "core/print_string.h" #include "core/print_string.h"
#include "core/variant.h" #include "core/variant.h"

View File

@ -2,37 +2,6 @@
Import('env') Import('env')
env_math = env.Clone() # Maybe make one specific for crypto? env_math = env.Clone()
is_builtin = env["builtin_mbedtls"]
has_module = env["module_mbedtls_enabled"]
if is_builtin or not has_module:
# Use our headers for builtin or if the module is not going to be compiled.
# We decided not to depend on system mbedtls just for these few files that can
# be easily extracted.
env_math.Prepend(CPPPATH=["#thirdparty/mbedtls/include"])
# MbedTLS core functions (for CryptoCore).
# If the mbedtls module is compiled we don't need to add the .c files with our
# custom config since they will be built by the module itself.
# Only if the module is not enabled, we must compile here the required sources
# to make a "light" build with only the necessary mbedtls files.
if not has_module:
env_thirdparty = env_math.Clone()
env_thirdparty.disable_warnings()
# Custom config file
env_thirdparty.Append(CPPDEFINES=[('MBEDTLS_CONFIG_FILE', '\\"thirdparty/mbedtls/include/godot_core_mbedtls_config.h\\"')])
thirdparty_mbedtls_dir = "#thirdparty/mbedtls/library/"
thirdparty_mbedtls_sources = [
"aes.c",
"base64.c",
"md5.c",
"sha1.c",
"sha256.c",
"godot_core_mbedtls_platform.c"
]
thirdparty_mbedtls_sources = [thirdparty_mbedtls_dir + file for file in thirdparty_mbedtls_sources]
env_thirdparty.add_source_files(env.core_sources, thirdparty_mbedtls_sources)
env_math.add_source_files(env.core_sources, "*.cpp") env_math.add_source_files(env.core_sources, "*.cpp")

View File

@ -30,9 +30,9 @@
#include "file_access.h" #include "file_access.h"
#include "core/crypto/crypto_core.h"
#include "core/io/file_access_pack.h" #include "core/io/file_access_pack.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/math/crypto_core.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/project_settings.h" #include "core/project_settings.h"

View File

@ -31,7 +31,7 @@
#include "ustring.h" #include "ustring.h"
#include "core/color.h" #include "core/color.h"
#include "core/math/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/math/math_funcs.h" #include "core/math/math_funcs.h"
#include "core/os/memory.h" #include "core/os/memory.h"
#include "core/print_string.h" #include "core/print_string.h"

View File

@ -32,8 +32,8 @@
#include "core/color_names.inc" #include "core/color_names.inc"
#include "core/core_string_names.h" #include "core/core_string_names.h"
#include "core/crypto/crypto_core.h"
#include "core/io/compression.h" #include "core/io/compression.h"
#include "core/math/crypto_core.h"
#include "core/object.h" #include "core/object.h"
#include "core/os/os.h" #include "core/os/os.h"
#include "core/script_language.h" #include "core/script_language.h"

View File

@ -30,11 +30,11 @@
#include "editor_export.h" #include "editor_export.h"
#include "core/crypto/crypto_core.h"
#include "core/io/config_file.h" #include "core/io/config_file.h"
#include "core/io/resource_loader.h" #include "core/io/resource_loader.h"
#include "core/io/resource_saver.h" #include "core/io/resource_saver.h"
#include "core/io/zip_io.h" #include "core/io/zip_io.h"
#include "core/math/crypto_core.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/project_settings.h" #include "core/project_settings.h"

View File

@ -29,8 +29,8 @@
/*************************************************************************/ /*************************************************************************/
#include "editor_scene_importer_gltf.h" #include "editor_scene_importer_gltf.h"
#include "core/crypto/crypto_core.h"
#include "core/io/json.h" #include "core/io/json.h"
#include "core/math/crypto_core.h"
#include "core/math/math_defs.h" #include "core/math/math_defs.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"
#include "core/os/os.h" #include "core/os/os.h"

View File

@ -35,7 +35,7 @@
#include "wsl_client.h" #include "wsl_client.h"
#include "wsl_server.h" #include "wsl_server.h"
#include "core/math/crypto_core.h" #include "core/crypto/crypto_core.h"
#include "core/math/random_number_generator.h" #include "core/math/random_number_generator.h"
#include "core/os/os.h" #include "core/os/os.h"

View File

@ -30,9 +30,9 @@
#include "export.h" #include "export.h"
#include "core/bind/core_bind.h" #include "core/bind/core_bind.h"
#include "core/crypto/crypto_core.h"
#include "core/io/marshalls.h" #include "core/io/marshalls.h"
#include "core/io/zip_io.h" #include "core/io/zip_io.h"
#include "core/math/crypto_core.h"
#include "core/object.h" #include "core/object.h"
#include "core/os/dir_access.h" #include "core/os/dir_access.h"
#include "core/os/file_access.h" #include "core/os/file_access.h"