From cfb9623e83c1408ee5d3516fdd728b8caaff921a Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 5 Oct 2026 12:52:45 +0000 Subject: [PATCH] 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) Claude-Session: https://claude.ai/code/session_011tcyLz63pXjoYEwsFjfg8F --- android/app/build.gradle.kts | 1 + runtime/src/platform/host_platform.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index beccbc4..5855470 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -28,6 +28,7 @@ val prepareRuntimeResources by tasks.registering(Copy::class) { from(File(assets, "wii")) { into("runtime_resources/wii_bootstrap") } from(File(assets, "dsp/dsp_coef.bin")) { 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) } diff --git a/runtime/src/platform/host_platform.cpp b/runtime/src/platform/host_platform.cpp index 4a8876b..25b7c28 100644 --- a/runtime/src/platform/host_platform.cpp +++ b/runtime/src/platform/host_platform.cpp @@ -48,7 +48,7 @@ std::optional ExecutableDirectory() noexcept { return (ec ? std::filesystem::path(path) : resolved).parent_path(); #elif defined(__ANDROID__) // 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. if (const char* resources = std::getenv("MKW_ANDROID_RESOURCES_DIR"); resources && *resources) { return std::filesystem::path(resources);