1

I faced a weird issue (which is resolved without any action :-)) and just wanted to know if some one knows how it might have happened.

Background:

So my testing server has a logic which connects to a payment gateway (third party) using a REST URL to get the list of banks it supports. Since its a background connection & constant service URL, I have used dummy truststore for my http client ( Something like this). My app is running on a server with UTC timezone.

The Problem:

This is how it started, from October 31, 2016 EOD to November 1 , 2016 EOD - whne ever the https REST URL was accessed It thrown a "javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated" exception. The java version was open-jdk-1.7.0.09 & I tried on a different server with same configuration the situation was same. When I updated the java to 1.7.0.101 in one server it started working. I left the problem to cehck for today & on Nov 2, 2016 just with a jvm restart everything works fine. There is no problem with certificate validation / connection. One weird fact I found was the java default timezone changed to America/Los Angeles from UTC. Also the daylight savings was set to true (Ok October has ended).

Question:

Is there any connection for the Timezone with SSL handshakes? I do not see any other change in the environment / code. Does any one know something about this? I hope this is not a violation of question standards :-)

Community
  • 1
  • 1
Kris
  • 8,680
  • 4
  • 39
  • 67

1 Answers1

4

In a properly written TLS stack the current time zone does not matter. The expiration time of a certificate is stored with UTC and is thus independent from the time zone. The time for comparison should therefore be in UTC too. And on proper OS the local time is internally stored in UTC too although Windows might be an exception here. Thus if all use UTC the change of time zones will be no problem. Of course it still might be that someone messed up this nice theory by using functionality depending on the time zone.

Steffen Ullrich
  • 114,247
  • 10
  • 131
  • 172
  • There is no exception for Windows. The system time internally is indeed UTC. It's only the BIOS clock that is kept in local time, which is irrelevant to this question. You are correct that SSL/TLS is only dependent on UTC. – Matt Johnson-Pint Nov 02 '16 at 18:03