From 9d1d386bd0b7dc3b613a5ab6fda2e81c3c1d89dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 25 May 2022 14:19:49 +0200 Subject: [PATCH] HTML5: Enable mbedTLS module for Crypto object Increases the size of the wasm by around 3% (~300-350 KiB). This enables using the Crypto object for hashing, signing and encryption, and therefore reduces the gap between the features of the HTML5 platform and other platforms. Closes https://github.com/godotengine/godot-proposals/issues/3574. (cherry picked from commit 3ff6d794c0aac0365f236cd078b5e5aeea0d996e) --- doc/classes/CryptoKey.xml | 1 - doc/classes/HashingContext.xml | 1 - doc/classes/X509Certificate.xml | 1 - platform/javascript/detect.py | 5 ----- 4 files changed, 8 deletions(-) diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index e284ec818b8..2d26aa7beb2 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -6,7 +6,6 @@ The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. They can be used to generate a self-signed [X509Certificate] via [method Crypto.generate_self_signed_certificate] and as private key in [method StreamPeerSSL.accept_stream] along with the appropriate certificate. - [b]Note:[/b] Not available in HTML5 exports. diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 5281cd2498f..014de4ce69f 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -27,7 +27,6 @@ # Print the result as hex string and array. printt(res.hex_encode(), Array(res)) [/codeblock] - [b]Note:[/b] Not available in HTML5 exports. diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index ab810f60425..50eba284087 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -6,7 +6,6 @@ The X509Certificate class represents an X509 certificate. Certificates can be loaded and saved like any other [Resource]. They can be used as the server certificate in [method StreamPeerSSL.accept_stream] (along with the proper [CryptoKey]), and to specify the only certificate that should be accepted when connecting to an SSL server via [method StreamPeerSSL.connect_to_stream]. - [b]Note:[/b] Not available in HTML5 exports. diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index dda113b394d..90781046a51 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -48,11 +48,6 @@ def get_flags(): return [ ("tools", False), ("builtin_pcre2_with_jit", False), - # Disabling the mbedtls module reduces file size. - # The module has little use due to the limited networking functionality - # in this platform. For the available networking methods, the browser - # manages TLS. - ("module_mbedtls_enabled", False), ]