Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

error connecting ssl #13

Open
thsnielsen opened this issue May 9, 2019 · 3 comments
Open

error connecting ssl #13

thsnielsen opened this issue May 9, 2019 · 3 comments

Comments

@thsnielsen
Copy link

Hello trying out your app. But cannot connect.
when i enter my dnsname for example
somedomain.ddns.net:8085
then check "use HTTPS" (and remove the :443 added to the above)
then submit, i briefly get :
javax.net.ssl.SSLHandshakeException:java.security.cert.CertPathValidatorException: tr.. (i do not see the rest)
Then i am back to the "Lets get things set up" menu.
When i access using a browser, i can access connect using ssl all right.
I expect the error is about trust, as i created my own certificate authority, intermediate ca and server certs. But again from a browser all is good the subject name is fine, so in the browser i just need to accepts "unknown issuer" and then connect. I GUESS (;-) all needed is a dialogue "are you sure you want to trust this certificate" Y/N.

@ardevd
Copy link
Owner

ardevd commented May 9, 2019

Hi there. Indeed the issue is the fact that you use a self signed certificate, something I have not implemented support for unfortunately.

Is there any particular reason why you don't use a valid certificate?

@ardevd
Copy link
Owner

ardevd commented May 9, 2019

Alternatively, you can always import your CA to the Android trust store which would also solve the problem. That's probably the best option if you can't use a valid trusted certificate.

@hammer-83
Copy link

Hello, I have the same issue. My CA is in Android user trusted credentials and Habitat throws a handshake exception. I think this is because Nougat+ application do not trust user CAs by default. See here: https://android-developers.googleblog.com/2016/07/changes-to-trusted-certificate.html. If you could add a network-security-config in the next version to allow user CAs by default, it would be greatly appreciated.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants