-
Problem scope
App version
Android version and device/firmware typeAndroid 15 Steps to reproduce
Actual resultConnection failure when attempting to sync, with log:
Expected resultSuccessful connection and sync. Further infoI have a self-hosted radicale behind nginx, which has a fallback server block configuration like this:
I omitted parts of the config that are not relevant. The purpose of this is to reject connections that do not specify a hostname that is served by the server. Otherwise, nginx defaults to serving the first server block in its configuration, even if the requested hostname does not match the server_name in that block. With this fallback block, DAVx5 reports:
A quick test with OpenSSL shows that this is probably due to not including Server Name Indication (SNI) in the TLS handshake:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Should work without problems, as DAVx5 uses SNI. Also I have tried to reproduce with Can you provide a host name so that I can have a look? |
Beta Was this translation helpful? Give feedback.
-
I cannot provide a hostname, my server is in a private network. But this gave me an idea. I enabled nginx debug logging to see details about the TLS handshake attempts. It seems DAVx5 (or the SSL library?) only sends a server name in the Client Hello, if the server name is an FQDN. Setting 192.168.1.2 - does not work: nginx log says "SSL server name: null" I do not have this problem with Thunderbird, where I only specify "https://myserver/radicale/...". Aside from testing, I actually use the local IP address in DAVx5 to connect (it's included as a Subject Alt Name in the certificate). I need to do this because I've set an external "Private DNS" server in Android, and then of course Android cannot resolve local hostnames or zones. Unlike desktop OSes, Android does not seem to have a hosts file or similar for manual overrides. So for this to work in my use case, hostnames and even IP addresses would have to be sent in SNI, if that's what the URL contains. If the SSL library does not support this, the only workaround I have is to not use Edit: The latest applicable RFC, RFC 6066, states:
OpenSSL from the command line does not set the server name when using a hostname or IP. Thunderbird is configured with "https://myserver/radicale/..." and does send the hostname as server name. Edit 2: The RFC also states:
TL;DR: We should not try to enforce SNI on servers that we want to connect to with just a hostname, and we cannot enforce SNI on servers that we want to connect to with just an IP address (with a valid certificate for it, still). Fair enough. And one more edit: I only thought this is a DAVx5 issue because all other clients I use (Thunderbird, Firefox, Vanadium) are able to connect using just a hostname. |
Beta Was this translation helpful? Give feedback.
I cannot provide a hostname, my server is in a private network. But this gave me an idea. I enabled nginx debug logging to see details about the TLS handshake attempts. It seems DAVx5 (or the SSL library?) only sends a server name in the Client Hello, if the server name is an FQDN.
Setting
server_name myserver myserver.lan 192.168.1.2;
in my radicale server block:192.168.1.2 - does not work: nginx log says "SSL server name: null"
myserver - does not work: nginx log says "SSL server name: null"
myserver.lan - works: nginx log says "SSL server name: myserver.lan"
I do not have this problem with Thunderbird, where I only specify "https://myserver/radicale/...".
Aside from testing, I actuall…