Troubleshooting SSL Silliness: When Time Is Not on Your Side

By |Published On: February 27th, 2018|Tags: |

This quick hit was brought to you by the letter “T”, because Tea is yummy and I can’t tell you the person who inspired this post because he has access to my morning Tea. See? The letter T! ANYWAY, SSL is a good thing overall, but sometimes it can get a little bit annoying to troubleshoot – especially if you don’t deal with it every day.

Here’s the setup.

A developer was using a library to connect to an API (server side, this is important) in a virtual dev environment, and he was getting the following error:

Copy to Clipboard

I immediately thought, “The time is wrong on the box,” because “not yet valid” is a huge giveaway. So, I asked what the date and time were in his environment. He replied, “Mon Feb 12 20:52:47 UTC 2018” and also added, “not wrong enough to break it though” – which isn’t accurate (not his fault, he’s a developer and not a cryptologist) and here’s why.

All time things are important.

SSL certificates (or TLS if you prefer) have what is called a “start-of-validity” date. This allows you to validate a certificate “in the past,” which also sounds really complicated… because it is. So I’m not going to explain the why of it, just that it exists and is as important as the expiration date – just in reverse. All this means is that each SSL certificate you encounter would have a start date (notBefore) and an expiration date (notAfter), and if the time is wrong on your client or server you’re going to have a bad time. All things time matter, they just do.

For the good of all humankind, make sure clients and servers are time synced in your environment.

The troubleshooting steps then went as follows.

Copy to Clipboard

After seeing the “notBefore” output, and already knowing the incorrect time (Feb 12) on the system, it was pretty easy to conclude that time was the problem. Once we went in and told his environment to use the NTP Pool, the time synced up, the problem was solved, and crisis averted.

Now, you might be asking yourself, “Self, is this as important to check in VPN setups?” and the answer is a resounding yes. Throughout many years (more than I care to recall or count), I have “one-call closed” many tickets simply because the VPN endpoint on the other end thought it was Friday instead of Monday. I had to ruin that poor endpoint’s whole week.

About Hurricane Labs

Hurricane Labs is a dynamic Managed Services Provider that unlocks the potential of Splunk and security for diverse enterprises across the United States. With a dedicated, Splunk-focused team and an emphasis on humanity and collaboration, we provide the skills, resources, and results to help make our customers’ lives easier.

For more information, visit www.hurricanelabs.com and follow us on Twitter @hurricanelabs.