2

When I call an API hosted on a secure server SSL (HTTPS) and the date time of the system are wrong (set manually) then we have following errors:

javax.net.ssl.SSLHandshakeException: Chain validation failed
java.security.cert.CertPathValidatorException: Response is unreliable: its validity interval is out-of-date
java.security.cert.CertPathValidatorException: Could not determine revocation status

Is there any way to allow application to load the response from an API even with wrong mobile date and time?

The strange issue is that all other apps are working fine even those that have APIs with HTTPS.

What changes I need to do so it allows mobile app to call the API (HTTPS) with wrong date time as well?

Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
yogs
  • 788
  • 2
  • 11
  • 29
  • The same occurs in my app. One thing that I couldn't figured out though is that it only occurs on the first run of the app. If I close and reopen the app, even with the wrong date set on my device, the error stops happening. – Augusto Carmo Aug 04 '20 at 14:44

1 Answers1

2

I have a similar problem. The emulator device has a wrong date and https connections fail. You can try to use some examotage.

When I had to solve this kind of problem I found that the simple solution is the best: simply change date time of the device.

To do this by shell commands, try these links on medium, and on StackOverflow.

I hope it helps you.

xcesco
  • 4,690
  • 4
  • 34
  • 65
  • This helps me, the Android S emulator on M1 device has wrong date. Reset the date by following the instruction on those link will fix the error CertPathValidatorException Response is unreliable its validity interval is out-of-date – leegor Apr 05 '21 at 07:11