cassidyjames / butler

Home Assistant companion app for Linux
https://cassidyjames.com
GNU General Public License v3.0
89 stars 1 forks source link

Using self-signed certificates for local usage gives "Unacceptable TLS certificate" error #39

Open qgjdev opened 5 months ago

qgjdev commented 5 months ago

Hi and thanks a lot for your work!

I'm using a local HA instance which is only accessible locally (LAN) or via VPN. Here, I created a self-signed certificate to be able to estabilsh HTTPS connections to the HA instance. It works fine on my browser and my Android device, however the Butler app just quits the server connection after setting the server with the error message "Unacceptable TLS certificate".

I have already added my certificate to ca-certificates.

Is there anything else I need to think of? If not so, it'd be great to be able to import your own CA certificates to be able to access HA using Butler.

Thanks a lot in advance.

moritzruth commented 3 months ago

Disclaimer: I have no experience using Vala and the following may be irrelevant.

There is a method on WebKit.NetworkSession (source):

public void set_tls_errors_policy (TLSErrorsPolicy policy)

And a possible value of TLSErrorsPolicy is TLSErrorsPolicy.IGNORE which, I assume, will disable TLS certificate validation.