Trust user-installed CA certificates (self-hosted servers behind a private CA)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 50/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Kotlin
- Estrellas
- 146
- Forks
- 35
- Merge medio
- 7 h 41 min
- PR fusionados (30 d)
- 221
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode-android
-
F-droid releaseAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
anomalyco/opencode-android#345 ·
Los mantenedores suelen responder en 1 día
-
Crash: IllegalStateException in AppContext.getLiveValuePosiblemente ocupada @Tarquinen la tomó hace 1 día. Abiertocrash crash-triaged
Dificultad 3/5 Medio día Aptitud para principiantes 65/100
anomalyco/opencode-android#343 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
crash crash-needs-human crash-triaged
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
anomalyco/opencode-android#341 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
crash crash-needs-human crash-triaged
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
anomalyco/opencode-android#340 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponsePosiblemente ocupada @Tarquinen la tomó hace 3 días. Abiertocrash crash-triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
anomalyco/opencode-android#320 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode-android
Issues similares
-
feature request needs decision
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
tswistak/Battery-Monitor#207 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
IzzyOnDroid inclusionAbiertoF-Droid FOSS question
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
d4rken-org/butler#365 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
panel-assistant/android#224 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día