3

I have an Android app which was working fine in all devices but recently when I checked it in new Android Samsung A6+ then get the exception i.e..

HTTP FAILED: javax.net.ssl.SSLHandshakeException: Chain validation failed

Getting this issue while calling web service using Retrofit 2.4.0. Here what am getting via catch block logs

Certificate has been revoked, reason: CESSATION_OF_OPERATION, revocation date: Wed Aug 15 01:42:14 GMT+05:30 2018, authority: CN=Starfield Validation Authority - G2, O="Starfield Technologies, LLC", L=Scottsdale, ST=Arizona, C=US, extension OIDs: []
Nassa44
  • 308
  • 2
  • 4
  • 15
  • 1
    It's working with "http" request and generating exception while using "https". It means the URL we are using to request web service should have SSL certificates. Thanks stack overflow! – Nassa44 Aug 24 '18 at 11:51
  • So as the error says the certificate of that server is not valid anymore, Consider to avoid the certificate validation, following [this answer](https://stackoverflow.com/questions/37686625/disable-ssl-certificate-check-in-retrofit-library) or [this tutorial](https://futurestud.io/tutorials/retrofit-2-how-to-trust-unsafe-ssl-certificates-self-signed-expired) – ollaw Aug 24 '18 at 13:32
  • are you sure that the SLL certificate is still valid? – Black-8 Aug 24 '18 at 14:13
  • 1
    Thanks for your support ollaw and Black-8. Yes, I checked with the backend team and they address that the SSL Certification has been expired. – Nassa44 Aug 25 '18 at 05:18

1 Answers1

0

Problem - javax.net.ssl.SSLHandshakeException: Chain validation failed solution - basically when you are using server api then this problem will occurs. some time this occurs, because of hosted data api subdomain ssl certificate expire. and one more thing this issue will be resolved from the server side.

  • 1
    Please provide additional details in your answer. As it's currently written, it's hard to understand your solution. – Community Aug 27 '21 at 06:31