- Home /
 
Server certificates on Android question
Hello everyone. So I built my apk (fully working in the editor with server as well) and I got the following error. I already checked manifest for internet permission.
 javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
 
               This happens when I try to communicate with my server through both WWW and UnityWebRequest functions. Checked with both "http" and "https". So, I found out it's a self-signed / missing intermediate certificate issue. I checked on DigiCert and found out my server has indeed untrusted certificates : 
 I decided the to install openssl plugin and test some more, so i run the following line in cmd :
 openssl s_client -debug -connect www.thedomaintocheck.com:443
 
               and the logs that follows are some that I think are important. (i can give the full log if needed)
 ......
 depth=0 C = US, ST = Washington, L = Seattle, O = Odin, OU = Plesk, CN = Plesk, emailAddress = info@plesk.com
 verify error:num=18:self signed certificate
 verify return:1
 depth=0 C = US, ST = Washington, L = Seattle, O = Odin, OU = Plesk, CN = Plesk, emailAddress = info@plesk.com
 verify error:num=10:certificate has expired
 notAfter=May 20 07:48:11 2017 GMT
 verify return:1
 depth=0 C = US, ST = Washington, L = Seattle, O = Odin, OU = Plesk, CN = Plesk, emailAddress = info@plesk.com
 notAfter=May 20 07:48:11 2017 GMT
 verify return:1
 ......
 
               and
 ......
     Certificate chain
      0 s:/C=US/ST=Washington/L=Seattle/O=Odin/OU=Plesk/CN=Plesk/emailAddress=info@plesk.com
        i:/C=US/ST=Washington/L=Seattle/O=Odin/OU=Plesk/CN=Plesk/emailAddress=info@plesk.com
     ---
     Server certificate
     -----BEGIN CERTIFICATE-----
     // stuff
     -----END CERTIFICATE-----
     subject=/C=US/ST=Washington/L=Seattle/O=Odin/OU=Plesk/CN=Plesk/emailAddress=info@plesk.com
     issuer=/C=US/ST=Washington/L=Seattle/O=Odin/OU=Plesk/CN=Plesk/emailAddress=info@plesk.com
     ---
     No client certificate CA names sent
     Peer signing digest: SHA512
     Server Temp Key: ECDH, P-256, 256 bits
     ---
     SSL handshake has read 1567 bytes and written 302 bytes
     Verification error: certificate has expired
     ......
 
               and
 ......
 Start Time: 1536579311
 Timeout   : 7200 (sec)
 Verify return code: 10 (certificate has expired)
 Extended master secret: no
 ......
 
               It's weird cause I get expired certificate while the site before game me the following results.. 
 But I also get a self-signed certificate, so which one is causing to fail? So, how should I go on from this? should I reach my server provider with this data? Or maybe i have a way to install the intermediate certificates said above? But how do I know which ones? Thanks for your time!
Answer by Ghislo · Sep 11, 2018 at 04:22 PM
Contacting the server provider with the same data posted here, helped them solving the problem for me.
Your answer