Commit ee7dd0c
committed
fix(network): 🔒 trust user-installed CAs for custom/internal CA servers (#80)
Self-hosters fronting Calibre-web/OPDS/sync/AI with a private or internal
CA hit 'Trust anchor for certification path not found' because, on API 24+,
apps trust system CAs only by default — even when the device browser, which
trusts user-installed CAs, connects fine.
Add a network-security-config whose base-config trusts both system and user
CAs, applied app-wide. Every network path (OkHttp clients, Readium's
DefaultHttpClient) uses platform-default trust, so this single config covers
them all with no Kotlin changes. Fixed third-party public hosts
(openlibrary.org + covers) are pinned back to system-only so they don't
inherit the user-CA trust expansion.
cleartextTrafficPermitted is intentionally left unset: targetSdk 34 already
disables cleartext by default.
Closes #801 parent 4128846 commit ee7dd0c
2 files changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
0 commit comments