Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML5: Enable mbedTLS module for Crypto object, force disable Asset Library #61402

Merged
merged 2 commits into from
May 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion doc/classes/Crypto.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
}
[/csharp]
[/codeblocks]
[b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 0 additions & 1 deletion doc/classes/CryptoKey.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<description>
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.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 0 additions & 1 deletion doc/classes/HMACContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@

[/csharp]
[/codeblocks]
[b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 0 additions & 1 deletion doc/classes/HashingContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
}
[/csharp]
[/codeblocks]
[b]Note:[/b] Not available in HTML5 exports.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 0 additions & 1 deletion doc/classes/X509Certificate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<description>
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.
</description>
<tutorials>
</tutorials>
Expand Down
4 changes: 4 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7025,11 +7025,15 @@ EditorNode::EditorNode() {
ScriptTextEditor::register_editor(); // Register one for text scripts.
TextEditor::register_editor();

// Asset Library can't work on Web editor for now as most assets are sourced
// directly from GitHub which does not set CORS.
#ifndef JAVASCRIPT_ENABLED
if (StreamPeerSSL::is_available()) {
add_editor_plugin(memnew(AssetLibraryEditorPlugin));
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
#endif

// Add interface before adding plugins.

Expand Down
4 changes: 4 additions & 0 deletions editor/project_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2773,6 +2773,9 @@ ProjectManager::ProjectManager() {
center_box->add_child(settings_hb);
}

// Asset Library can't work on Web editor for now as most assets are sourced
// directly from GitHub which does not set CORS.
#ifndef JAVASCRIPT_ENABLED
if (StreamPeerSSL::is_available()) {
asset_library = memnew(EditorAssetLibrary(true));
asset_library->set_name(TTR("Asset Library Projects"));
Expand All @@ -2781,6 +2784,7 @@ ProjectManager::ProjectManager() {
} else {
WARN_PRINT("Asset Library not available, as it requires SSL to work.");
}
#endif

{
// Dialogs
Expand Down
5 changes: 0 additions & 5 deletions platform/javascript/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
("vulkan", False),
]

Expand Down