Trust user-installed CA certificates (self-hosted servers behind a private CA)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 50/100
調査の方向性
The trust configuration lives in app/src/main/res/xml/network_security_config.xml, whose base-config has no trust-anchors element. Check that the manifest points to this file, then read how the app builds its HTTPS client for server pairing. The maintainer has not chosen between the three options, so confirm the approach in the thread before editing. Done means a user-installed CA is accepted when pairing with a server behind a private CA.
索引モデルが issue の本文から書いたものです。
説明
Problem
Pairing with an OpenCode server whose TLS certificate is signed by a private root CA
fails with -1202 serverCertificateUntrusted, although the root CA is installed on the
device (Settings → Security → Encryption & credentials → Trusted credentials → User).
Chrome on the same device opens the same URL without any certificate warning, so the
CA, the certificate chain and the SAN are all valid.
This is a common setup for self-hosted servers: a reverse proxy (nginx here) with a
certificate from a personal CA, reachable on the local network.
Environment
- App: OpenCode 0.8.6 (1015), installed from Google Play
- Server: nginx 1.27 terminating TLS in front of OpenCode, certificate signed by a private
root CA (RSA 2048, SHA-256, SAN matches the hostname, full chain served)
Error
URLError -1202 serverCertificateUntrusted · https://<host>:<port>
Phase: Pair
Message: Couldn't reach the OpenCode server
Cause
app/src/main/res/xml/network_security_config.xml only sets
<base-config cleartextTrafficPermitted="true" /> without <trust-anchors>.
On Android 7+ this means only system CAs are trusted; user-installed CAs are ignored.
Possible solutions
Any of these would solve it:
- Trust user CAs in the network security config (smallest change):
<base-config cleartextTrafficPermitted="true"> <trust-anchors> <certificates src="system" /> <certificates src="user" /> </trust-anchors> </base-config> - A toggle in Settings, e.g. "Trust user-installed certificates", off by default.
Since the network security config is static, this would need an OkHttp
X509TrustManagerthat combines the system store with the user CAs
(AndroidCAStore) when the toggle is on. - Importing a root CA in the app, e.g. per server under Edit Server, stored in
the app's own trust store. This works without installing the CA system-wide and
limits trust to that one server.
Option 1 matches what Chrome already does; options 2 and 3 give users more explicit
control.
- 主要言語
- Kotlin
- スター
- 146
- フォーク
- 35
- 平均マージ
- 7時間 41分
- マージ済み PR(30日)
- 221
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
anomalyco/opencode-android のほかの issue
-
F-droid releaseオープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
anomalyco/opencode-android#345 ·
メンテナーはふだん 1 日以内に返信
-
Crash: IllegalStateException in AppContext.getLiveValue対応中かも @Tarquinen が 1 日前に担当しました。 オープンcrash crash-triaged
難易度 3/5 半日 初心者へのやさしさ 65/100
anomalyco/opencode-android#343 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
crash crash-needs-human crash-triaged
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
anomalyco/opencode-android#341 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
crash crash-needs-human crash-triaged
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
anomalyco/opencode-android#340 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponse対応中かも @Tarquinen が 3 日前に担当しました。 オープンcrash crash-triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
anomalyco/opencode-android#320 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
anomalyco/opencode-android の issue をすべて見る
似ている issue
-
feature request needs decision
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
tswistak/Battery-Monitor#207 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
F-Droid FOSS question
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
d4rken-org/butler#365 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
panel-assistant/android#224 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信