From: Julien HENRY Date: Thu, 25 Aug 2016 14:10:33 +0000 (+0200) Subject: SONAR-8012 Restore support of IBM JVM in WS client X-Git-Tag: 6.1-RC1~293 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1176%2Fhead;p=sonarqube.git SONAR-8012 Restore support of IBM JVM in WS client --- diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpConnector.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpConnector.java index d063fe9383b..0ffe844c408 100644 --- a/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpConnector.java +++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/HttpConnector.java @@ -25,7 +25,6 @@ import java.util.Map; import java.util.concurrent.TimeUnit; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import javax.net.ssl.SSLSocketFactory; import okhttp3.Call; import okhttp3.ConnectionSpec; import okhttp3.Credentials; @@ -101,19 +100,10 @@ public class HttpConnector implements WsConnector { .supportsTlsExtensions(true) .build(); okHttpClientBuilder.connectionSpecs(asList(tls, ConnectionSpec.CLEARTEXT)); - okHttpClientBuilder.sslSocketFactory(createSslSocketFactory()); return okHttpClientBuilder.build(); } - private static SSLSocketFactory createSslSocketFactory() { - try { - return (SSLSocketFactory) SSLSocketFactory.getDefault(); - } catch (Exception e) { - throw new IllegalStateException("Fail to init TLS context", e); - } - } - @Override public String baseUrl() { return baseUrl.url().toExternalForm();