title: SSL exception invoking a rest api from Java
body: <p>I see SSL exception while invoking a rest api using Jersey API client library.
  This used to work fine till few days ago. Based on the exception, I understand it is certificate expiry related. <br>However I am not sure if the client machine needs to have the certificate (if any) upgraded or the API implementation server needs to upgrade. <br> Code I use to call the API is mentioned below. I verified the ssl certs on my machine using <a href="https://stackoverflow.com/questions/21297853/how-to-determine-ssl-cert-expiration-date-from-a-pem-encoded-certificate">How to determine SSL cert expiration date from a PEM encoded certificate?</a> and I could not find any expired certificates.</p>
  
  <pre> 
  com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: timestamp check failed
      at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:151)
  </pre>
  
  <pre class="lang-java prettyprint-override"><code>Client client = Client.create(JerseyJacksonConfigFactory.getConfig());
  this.resource = client.resource(baseUrl);
  resource.path("foo").entity(barEntity).type(MediaType.APPLICATION_JSON_TYPE).accept(MediaType.APPLICATION_JSON).put();
  </code></pre>