Trust user-installed CA certificates (self-hosted servers behind a private CA)
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 50/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Kotlin
- Estrelas
- 146
- Forks
- 35
- Merge médio
- 7h 41min
- PRs com merge (30d)
- 221
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de anomalyco/opencode-android
-
F-droid releaseAberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
anomalyco/opencode-android#345 ·
Mantenedores costumam responder em até 1 dia
-
Crash: IllegalStateException in AppContext.getLiveValueTalvez já em andamento @Tarquinen assumiu há 1 dia. Abertacrash crash-triaged
Dificuldade 3/5 Meio dia Facilidade para iniciantes 65/100
anomalyco/opencode-android#343 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
crash crash-needs-human crash-triaged
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
anomalyco/opencode-android#341 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
crash crash-needs-human crash-triaged
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 45/100
anomalyco/opencode-android#340 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Crash: OutOfMemoryError in LiveTransportKt$awaitResponse$2$2.onResponseTalvez já em andamento @Tarquinen assumiu há 3 dias. Abertacrash crash-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 35/100
anomalyco/opencode-android#320 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de anomalyco/opencode-android
Issues semelhantes
-
[Request]: KylleneAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
ScoopInstaller/Extras#19589 ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
-
difficulty: beginner documentation help wanted networking
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
feature request needs decision
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 83/100
tswistak/Battery-Monitor#207 ·
Mantenedores costumam responder em até 1 dia