You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to make Unirest calls to internal servers that require client auth but I keep getting bad_certificate errors. I've checked everything about the client certs I'm using and they all check out. I've tried making openssl and curl calls with the same certs and they connect to the server via ssl just fine. I spent days troubleshooting the certificate to no avail. Then I finally decided to try making a simple URLConnection with the same certs and it worked fine. Is there a bug in Unirest that doesn't allow for SSL connections that require client auth?
// Set all ssl properties
System.setProperty("javax.net.ssl.keyStore", "/path/to/keystore");
System.setProperty("javax.net.ssl.keyStorePassword", "keystorePass");
System.setProperty("javax.net.ssl.trustStore", "/path/to/trustStore");
System.setProperty("javax.net.ssl.trustStorePassword", "truststorePass");
String uri = "https://server.net/REST/endpoint";
URL url = new URL(uri);
// This works fine
URLConnection con = url.openConnection();
// This does not work and throws bad_certificate errors
HttpResponse<JsonNode> jsonResp = Unirest.get(uri).asJson();
The text was updated successfully, but these errors were encountered:
From #120
I'm trying to make Unirest calls to internal servers that require client auth but I keep getting bad_certificate errors. I've checked everything about the client certs I'm using and they all check out. I've tried making openssl and curl calls with the same certs and they connect to the server via ssl just fine. I spent days troubleshooting the certificate to no avail. Then I finally decided to try making a simple URLConnection with the same certs and it worked fine. Is there a bug in Unirest that doesn't allow for SSL connections that require client auth?
The text was updated successfully, but these errors were encountered: