Trust user-installed CA certificates (self-hosted servers behind a private CA)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 50/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Kotlin
- Stelle
- 146
- Fork
- 35
- Merge medio
- 7h 41m
- PR unite (30g)
- 221
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di anomalyco/opencode-android
-
F-droid releaseAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
anomalyco/opencode-android#345 ·
I maintainer di solito rispondono entro 1 giorno
-
Crash: IllegalStateException in AppContext.getLiveValueForse già presa @Tarquinen l’ha presa 1 giorno fa. Apertacrash crash-triaged
Difficoltà 3/5 Mezza giornata Idoneità per principianti 65/100
anomalyco/opencode-android#343 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
crash crash-needs-human crash-triaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
anomalyco/opencode-android#341 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
crash crash-needs-human crash-triaged
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
anomalyco/opencode-android#340 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponseForse già presa @Tarquinen l’ha presa 3 giorni fa. Apertacrash crash-triaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
anomalyco/opencode-android#320 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di anomalyco/opencode-android
Issue simili
-
feature request needs decision
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
tswistak/Battery-Monitor#207 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
IzzyOnDroid inclusionApertaF-Droid FOSS question
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
d4rken-org/butler#365 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
panel-assistant/android#224 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno