diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-06 18:22:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-06 18:22:42 +0200 |
commit | ce1811f9e207cc93b93f15bb40b585c809f7905d (patch) | |
tree | 7d5c83e9f3ec288fe57e3ae4a052366259b8724c /core/crypto/crypto.cpp | |
parent | 17af0104785eac9c416bb89989d82e2968f8ab8f (diff) | |
parent | 87cc283b8b74f78ce58d8510558ff0a8a9e35482 (diff) |
Merge pull request #39338 from Faless/crypto/instantiate_fix
Crypto virtual methods, fix editor crash when mbedtls is disabled
Diffstat (limited to 'core/crypto/crypto.cpp')
-rw-r--r-- | core/crypto/crypto.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/core/crypto/crypto.cpp b/core/crypto/crypto.cpp index eb942c60c9..a9a7cabee9 100644 --- a/core/crypto/crypto.cpp +++ b/core/crypto/crypto.cpp @@ -70,7 +70,7 @@ Crypto *Crypto::create() { if (_create) { return _create(); } - return memnew(Crypto); + ERR_FAIL_V_MSG(nullptr, "Crypto is not available when the mbedtls module is disabled."); } void Crypto::load_default_certificates(String p_path) { @@ -85,18 +85,6 @@ void Crypto::_bind_methods() { ClassDB::bind_method(D_METHOD("generate_self_signed_certificate", "key", "issuer_name", "not_before", "not_after"), &Crypto::generate_self_signed_certificate, DEFVAL("CN=myserver,O=myorganisation,C=IT"), DEFVAL("20140101000000"), DEFVAL("20340101000000")); } -PackedByteArray Crypto::generate_random_bytes(int p_bytes) { - ERR_FAIL_V_MSG(PackedByteArray(), "generate_random_bytes is not available when mbedtls module is disabled."); -} - -Ref<CryptoKey> Crypto::generate_rsa(int p_bytes) { - ERR_FAIL_V_MSG(nullptr, "generate_rsa is not available when mbedtls module is disabled."); -} - -Ref<X509Certificate> Crypto::generate_self_signed_certificate(Ref<CryptoKey> p_key, String p_issuer_name, String p_not_before, String p_not_after) { - ERR_FAIL_V_MSG(nullptr, "generate_self_signed_certificate is not available when mbedtls module is disabled."); -} - /// Resource loader/saver RES ResourceFormatLoaderCrypto::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, bool p_no_cache) { |