- + " and message: " + response.getEntity(String.class));
- }
-
- private void setProperties() throws NoSuchAlgorithmException, KeyManagementException {
- SSLContext sslContext = SSLContext.getInstance("SSL");
- sslContext.init(null, this.trustAll, new java.security.SecureRandom());
- HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
- // Install the all-trusting host verifier
- HttpsURLConnection.setDefaultHostnameVerifier(this.hostnameVerifier);
- DefaultClientConfig config = new DefaultClientConfig();
- Map<String, Object> properties = config.getProperties();
- HTTPSProperties httpsProperties = new HTTPSProperties((str, sslSession) -> true, sslContext);
- properties.put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, httpsProperties);