0

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.
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.
Code I use to call the API is mentioned below. I verified the ssl certs on my machine using How to determine SSL cert expiration date from a PEM encoded certificate? and I could not find any expired certificates.

 
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)
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();
Community
  • 1
  • 1
suman j
  • 6,710
  • 11
  • 58
  • 109
  • 1
    Connect to the server address and port with a browser. If the browser doesn't show you any issues with the SSL cert then it's the client side. – stdunbar Feb 26 '16 at 19:01
  • @stdunbar - Browser too prompts untrusted connection. So I believe this is from the API implementation side. Thanks. If you add it as answer, I will accept it. – suman j Feb 26 '16 at 19:25
  • Wich jdk are you using? – Oldskultxo Feb 29 '16 at 08:08

0 Answers0