Bundle the TLS root certificates in the Android app

The mbed TLS path looks for cacert.pem in the runtime resources folder on
Android, the same place as dsp_coef.bin.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011tcyLz63pXjoYEwsFjfg8F
This commit is contained in:
Claude committed 2026-10-05 12:58:11 +00:00
1 parent 35e045f9f7
commit cfb9623e83
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -28,6 +28,7 @@ val prepareRuntimeResources by tasks.registering(Copy::class) {
from(File(assets, "wii")) { into("runtime_resources/wii_bootstrap") } from(File(assets, "wii")) { into("runtime_resources/wii_bootstrap") }
from(File(assets, "dsp/dsp_coef.bin")) { into("runtime_resources") } from(File(assets, "dsp/dsp_coef.bin")) { into("runtime_resources") }
from(File(assets, "pipeline/initial_pipeline_cache.db")) { into("runtime_resources") } from(File(assets, "pipeline/initial_pipeline_cache.db")) { into("runtime_resources") }
from(File(assets, "certs/cacert.pem")) { into("runtime_resources") }
into(runtimeResources) into(runtimeResources)
} }
+1 -1
View File
@@ -48,7 +48,7 @@ std::optional<std::filesystem::path> ExecutableDirectory() noexcept {
return (ec ? std::filesystem::path(path) : resolved).parent_path(); return (ec ? std::filesystem::path(path) : resolved).parent_path();
#elif defined(__ANDROID__) #elif defined(__ANDROID__)
// Bundled read-only runtime resources (wii_bootstrap/, dsp_coef.bin, // Bundled read-only runtime resources (wii_bootstrap/, dsp_coef.bin,
// initial_pipeline_cache.db) unpacked from the APK by the activity. Stands // initial_pipeline_cache.db, cacert.pem) unpacked from the APK by the activity. Stands
// in for the executable directory the desktop builds look next to. // in for the executable directory the desktop builds look next to.
if (const char* resources = std::getenv("MKW_ANDROID_RESOURCES_DIR"); resources && *resources) { if (const char* resources = std::getenv("MKW_ANDROID_RESOURCES_DIR"); resources && *resources) {
return std::filesystem::path(resources); return std::filesystem::path(resources);