These are chat archives for Mashape/unirest-java

9th
Feb 2016
Phil Winder
@philwinder
Feb 09 2016 10:31
Hi guys. What would you suggest is best practise for mocking Unirest?
Lokikol
@Lokikol
Feb 09 2016 12:22

Hi there. I'm having problems with Unirest. I try to get data (from a REST API) from a service behind https. But I get the following error:

com.mashape.unirest.http.exceptions.UnirestException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.mashape.unirest.http.HttpClientHelper.request(HttpClientHelper.java:143)
    at com.mashape.unirest.request.BaseRequest.asJson(BaseRequest.java:68)

The https certificate is created using letsencrypt

shashi ranjan
@shashiranjan84
Feb 09 2016 21:38
@Lokikol seems like your Truststore missing CA certificate. Import the target CA cert properly.