I have an API rest deploy in an Apache server in Ubuntu 14 but I haven't got a domain. I type an IP address in my calls. I've added a SSL layer and all is ok in browser. But in Android I always get next exception
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
I generate an auto-signed certificate. I don't need authentication. I just need secure conection.
I use the code of android developers' page https://developer.android.com/training/articles/security-ssl.html?hl=es, and I use HttpsURLConnection With HTTP and IP address (without domain) all works.
I have consulted a lot forums and articles but I don't get the solution.
Can somebody help me?
Thanks in advance.