Skip to content

TLS and mTLS

M57 edited this page Nov 14, 2026 · 2 revisions

Manual HTTPS client certificates (mTLS)

Open Settings → Connection → TLS and mTLS configuration, or tap Connections on the first-launch landing page before signing in. Install client certificates in Android settings first; the app stores aliases only, never private keys.

Each binding belongs to an HTTPS hostname and port across all paths and connection profiles. Choose mTLS when adding a client identity. Use Add Configuration or Edit Configuration, then Select Certificate or Change Certificate to open Android KeyChain. A valid address, port and selected certificate are required to Save. Delete Configuration clears the saved binding without removing the system certificate. Cancelling the picker keeps the draft alias; leaving an edited draft asks whether to discard unsaved changes. Host/port edits preserve the draft certificate and invalidate pending choices. An editor dismissed or destroyed while the picker is open ignores its late callback.

Certificate prompt on sign-in

On the login screen, a failed initial /api/status probe offers certificate setup only when its HTTPS error cause chain contains an SSL exception with the exact received alert TLSV1_ALERT_CERTIFICATE_REQUIRED, SSLV3_ALERT_BAD_CERTIFICATE, SSLV3_ALERT_UNSUPPORTED_CERTIFICATE, SSLV3_ALERT_CERTIFICATE_REVOKED, SSLV3_ALERT_CERTIFICATE_EXPIRED, SSLV3_ALERT_CERTIFICATE_UNKNOWN, or TLSV1_ALERT_UNKNOWN_CA. Local server-trust/hostname failures and generic handshake or network failures do not trigger it. Missing and rejected client certificates use the same dialog and wording. The dialog fixes the host and port; you must explicitly select an installed certificate. Save verifies that candidate with a fresh TLS connection and one credential-free GET /api/status to that origin. Any HTTP response headers suffice, including 401/403; redirects are not followed. Failed verification leaves existing bindings unchanged and allows another selection. Cancel preserves the mTLS connection error. A successful save replaces any binding for that host and port and clears the previous connection error. Use the connection button to retry; later errors still appear normally. The inline notice points to Connections for changes.

Peers and providers reporting generic failures or other error formats may not trigger this prompt; use the manual configuration above. Later login steps, background requests and other screens do not trigger it. Network requests never open the system picker or wait for selection. Missing, expired, revoked or incompatible keys result in no client identity, so servers requiring mTLS fail normally until a usable binding is saved. REST, WebSocket, images, attachments and audio/video share the TLS configuration. Server certificate and hostname verification remain enabled; client identity selection does not change server trust.

What changes when you save

Saving (including selecting the same alias again) or deleting a configuration retires live TLS sockets and session contexts for the affected addresses. Retry failed requests or restart media playback; content already displayed or buffered may remain visible. Remote image memory/disk cache keys and gateway file cache keys include persistent identity generations and a shared cache epoch covering redirect destinations, so a late old response cannot populate the new identity's cache. While any binding exists, remote cache keys also include a per-launch epoch, because a KeyChain change made while the app was stopped cannot be observed; cached remote content is reused only within one app launch. Old cache entries age out under the existing cache policies. To isolate client identities, HTTP/2 connection coalescing across origins is disabled for the shared clients, including unbound origins; HTTP/2 within one origin remains enabled. A binding change also changes cache keys for unrelated remote resources because their redirect destinations are unknown before fetching. Redirects select the destination origin's saved identity only.

Per-origin server CA restrictions (TLS)

Open TLS and mTLS configuration, add a TLS configuration, and select one currently installed Android System or User CA for the HTTPS hostname and port. The picker shows full certificate subjects; tap one to review its source, issuer, validity and SHA-256 fingerprint before selecting it. TLS and mTLS rows are independent and can coexist for the same address. Paths and connection profiles share that origin.

The selected CA narrows the active global trust policy to that installed certificate. A User selection requires the global user-CA switch to be active for this process; saving a selection does not enable the switch. A User selection remains a User selection even if the same certificate is also installed as a System CA. Missing, replaced, malformed or invalid selections fail closed. Unconfigured origins use global trust. The platform still validates the certificate chain, and hostname verification remains enabled.

Adding, editing or deleting a TLS configuration takes effect immediately, using the same origin socket/session retirement and remote cache versioning as mTLS edits. Deletion restores global trust for that origin. Retained REST clients, WSS, attachments and client-certificate candidate verification use the destination origin's restriction; redirects are checked against their destination. Retry interrupted requests or reconnect as needed; content already displayed or buffered can remain visible. This app does not monitor Android CA store changes or close established connections when the OS store changes. Restart after changing Android's CA store, as described below.

User-installed private certificate authorities

For a server signed by a private CA, install that CA in Android's user certificate store, then enable Trust user-installed CAs in Connections, below the TLS and mTLS configuration entry. This global switch defaults to off, including when upgrading without a saved preference. Off uses the platform-default trust policy; on trusts active system and user CA roots for all connections using the shared TLS clients. Only enable it if you trust the installed user CAs. It does not restrict a CA to a specific server, accept arbitrary certificates, or bypass certificate validity, chain or hostname checks. mTLS client certificate bindings remain independent.

The switch saves your choice for the next app process start. Restart the app process (not just the settings page or activity) to apply it. A restart hint appears while the saved choice differs from this process's active policy; switching back clears the hint. Existing clients and connections keep the startup policy.

Android loads the CA store and validates certificate chains. The app does not monitor CA additions or removals or promise that they take effect while running; restart the app after changing the Android CA store. To stop trusting user CAs, turn the switch off and restart the app. Remove CAs in Android settings.

Clone this wiki locally