Trust user-installed CA certificates (self-hosted servers behind a private CA)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 50/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 146
- Fork
- 35
- Merge trung bình
- 7 giờ 41 phút
- Pull request đã merge (30 ngày)
- 221
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode-android
-
F-droid releaseĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
anomalyco/opencode-android#345 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crash: IllegalStateException in AppContext.getLiveValueCó thể đã có người làm @Tarquinen đã nhận 1 ngày trước. Đang mởcrash crash-triaged
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 65/100
anomalyco/opencode-android#343 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
crash crash-needs-human crash-triaged
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
anomalyco/opencode-android#341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
crash crash-needs-human crash-triaged
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
anomalyco/opencode-android#340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponseCó thể đã có người làm @Tarquinen đã nhận 3 ngày trước. Đang mởcrash crash-triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
anomalyco/opencode-android#320 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode-android
Issue tương tự
-
feature request needs decision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
tswistak/Battery-Monitor#207 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
IzzyOnDroid inclusionĐang mởF-Droid FOSS question
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
d4rken-org/butler#365 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
panel-assistant/android#224 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày