ranfdev / Notify

Linux client for https://ntfy.sh
GNU General Public License v3.0
59 stars 5 forks source link

Can't connect to self-hosted server using own tls certificate #21

Closed victornsc closed 1 month ago

victornsc commented 6 months ago

I get this error when I subscribe to a topic on my self-hosted server:

0: error trying to connect: invalid peer certificate: UnknownIssuer

The server is using a certificate signed by my own CA.

I switched from rustls-tls to rustls-tls-native-roots and now everything works fine.

rustls-tls trust roots are baked into the library whereas native-roots gets them from the operating system, which allows us to load our own CA/certificate.

Since a lot of people are self hosting their ntfy server, I think making the change will prevent them from running into the same problem.

test123-all commented 1 month ago

Hello :), I have the exact same error and problem as @victornsc that I want to use a selfsigned CA-Certificate inside of a intranet and your Notify app doesn't use the certificates from the operating system (set with the /usr/local/share/ca-certificates/ path and the update-ca-certificates CLI-tool).

I also tried to build the project with gnome-builder myself but I get a build error that seems to reside in the code base. Since I don't know anything about gnome-builder and not much about Rust, and already got SDK-dependency errors from gnome-builder, that have taken me some time, I will mark this problem as unresolved for now and will hope for an update.

Yours sincerely

ranfdev commented 1 month ago

Sorry for the delay. It should be fixed now. I'm now going to make some other changes to the app and then I'll publish a release on flathub