3

I'm using SSL certificate with HTTPS connection.I can login with the Samsung S4, not on Huawei and Samsung S3. I think it has to do with Android 4.x, on which you cannot login.Login works on Android 5.x it seems. Can anyone please guide that which could be the problem? Following is the exception:

? ca=CN=*.route2school.be, OU=Domain Control Validated
? ca=CN=*.route2school.be, OU=Domain Control Validated
? GC_CONCURRENT freed 424K, 9% free 13463K/14663K, paused 4ms+11ms, total 67ms
? javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
? at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)
? at libcore.net.http.HttpConnection.setupSecureSocket(HttpConnection.java:209)
? at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.makeSslConnection(HttpsURLConnectionImpl.java:478)
? at libcore.net.http.HttpsURLConnectionImpl$HttpsEngine.connect(HttpsURLConnectionImpl.java:433)
? at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:289)
? at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:239)
? at libcore.net.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:273)
? at libcore.net.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:168)
? at libcore.net.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:271)
? at com.splunk.mint.network.http.MonitorableHttpsURLConnection.getInputStream(MonitorableHttpsURLConnection.java:73)
? at com.dhcollator.routetoschool.network.request.GetRequest.doRequest(GetRequest.java:116)
? at com.dhcollator.routetoschool.network.NetworkThread.doInBackground(NetworkThread.java:75)
? at com.dhcollator.routetoschool.network.NetworkThread.doInBackground(NetworkThread.java:13)
? at android.os.AsyncTask$2.call(AsyncTask.java:287)
? at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
? at java.util.concurrent.FutureTask.run(FutureTask.java:137)
? at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
? at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
? at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
? at java.lang.Thread.run(Thread.java:856)
? Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
? at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:192)
? at org.apache.harmony.xnet.provider.jsse.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:163)
? at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:573)
? at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
? at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:371)
? ... 19 more
? Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
? ... 24 more
01-25 21:22:05.695    7261-9288/com.dhcollator.routetoschool E/SERVER-RESPONSE? null
Usman Rana
  • 2,067
  • 1
  • 21
  • 32

2 Answers2

0

Please make sure the date and time is correct. This was the problem in my case on same device (Samsung S3).

Ajji
  • 3,068
  • 2
  • 30
  • 31
0

The error Trust anchor for certification path not found indicates that the server uses a certificate that has been issued by a root CA that is not trusted by those old devices.

If you want to make it work you have to include that root certificate in your app and set is as trusted root certificate.

Follow the Google documentation Security with HTTPS and SSL. In your case especially the section "Unknown certificate authority" is relevant.

Robert
  • 39,162
  • 17
  • 99
  • 152
  • i have this problem only on 1 device, other work - good.Why ? – Тони Aug 23 '19 at 07:42
  • @Tony Compare the devices. What OS version is running, different manufacturer? Android security patch level date different? – Robert Aug 23 '19 at 08:17
  • well, work good on xioami and pixel and also motorolla with android 6.0 work - good. But i do`nt know nothing besides that this device Samsung a3 with android 6.0+ – Тони Aug 23 '19 at 08:23