Skip to content

android: honor user-installed CA certificates for DERP servers#812

Open
pks-t wants to merge 1 commit into
tailscale:mainfrom
pks-t:pks-tailscale-fix-derp-with-extra-root-cas
Open

android: honor user-installed CA certificates for DERP servers#812
pks-t wants to merge 1 commit into
tailscale:mainfrom
pks-t:pks-tailscale-fix-derp-with-extra-root-cas

Conversation

@pks-t

@pks-t pks-t commented Jun 21, 2026

Copy link
Copy Markdown

In e7fca1a (libtailscale,android: use ExtraRootCAs for user-installed CA certificates, 2026-04-08), we added the ability to honor user-installed CA certificates. This allows the user to connect to a Headscale server that uses a self-signed certificate.

While this works for connecting to the server itself, this new feature is broken in case any of the DERP servers contained in the DERP map use self-signed certificates, too. This is because we set up the cert pool for sys.ExtraRootCAs, but not for wgengine.Config. The latter though is what we use to configure the DERP client, and consequently the TLS dialer doesn't respect any user-installed CA certificates.

Fix this by propagating the cert pool via wgengine.Config.

In e7fca1a (libtailscale,android: use ExtraRootCAs for user-installed CA
certificates, 2026-04-08), we added the ability to honor user-installed
CA certificates. This allows the user to connect to a Headscale server
that uses a self-signed certificate.

While this works for connecting to the server itself, this new feature
is broken in case any of the DERP servers contained in the DERP map use
self-signed certificates, too. This is because we set up the cert pool
for `sys.ExtraRootCAs`, but not for `wgengine.Config`. The latter though
is what we use to configure the DERP client, and consequently the TLS
dialer doesn't respect any user-installed CA certificates.

Fix this by propagating the cert pool via `wgengine.Config`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants