GNM-703 - CIMCache in ServiceDistribution
diff --git a/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java b/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java index 560f0f9..97843ad 100644 --- a/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java +++ b/src/main/java/org/eclipse/openk/core/communication/RestServiceWrapper.java
@@ -16,6 +16,7 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.methods.*; +import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.TrustSelfSignedStrategy; import org.apache.http.entity.StringEntity; @@ -178,12 +179,14 @@ return req; } + private CloseableHttpClient createHttpsClient() throws HttpStatusException { if (useHttps) { try { SSLContextBuilder builder = new SSLContextBuilder(); builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); - SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build()); + SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), new NoopHostnameVerifier()); + return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } catch (Exception e) {