From 717667126cfdc7ca502d4542825f6707b36dd229 Mon Sep 17 00:00:00 2001 From: Lasantha Dharmakeerthi Date: Mon, 20 Nov 2023 20:20:39 +0000 Subject: [PATCH] revert 52b2cccf9fab314c1871aa8527f8dfdd2dd1de91 revert Upgrade apache http client version --- .../pom.xml | 4 ++-- .../pom.xml | 7 +++++-- .../mgt/core/ui/request/interceptor/util/HandlerUtil.java | 3 +-- pom.xml | 6 +++--- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml index 0c336eadda..0289d44e88 100644 --- a/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml +++ b/components/analytics-mgt/grafana-mgt/io.entgra.device.mgt.core.analytics.mgt.grafana.proxy.core/pom.xml @@ -189,8 +189,8 @@ compile - org.apache.httpcomponents.client5 - httpclient5 + org.apache.httpcomponents + httpclient io.entgra.device.mgt.core diff --git a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml index 747dd9b838..bf0036bdc7 100644 --- a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml +++ b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/pom.xml @@ -151,10 +151,13 @@ commons-logging commons-logging + - org.apache.httpcomponents.client5 - httpclient5 + org.apache.httpcomponents + httpclient + + org.apache.httpcomponents httpcore diff --git a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/util/HandlerUtil.java b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/util/HandlerUtil.java index 78ef321e5d..48285e5214 100644 --- a/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/util/HandlerUtil.java +++ b/components/ui-request-interceptor/io.entgra.device.mgt.core.ui.request.interceptor/src/main/java/io/entgra/device/mgt/core/ui/request/interceptor/util/HandlerUtil.java @@ -42,7 +42,6 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.conn.ssl.X509HostnameVerifier; import org.apache.http.cookie.SM; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.entity.ContentType; @@ -367,7 +366,7 @@ public class HandlerUtil { boolean isIgnoreHostnameVerification = Boolean.parseBoolean(System. getProperty("org.wso2.ignoreHostnameVerification")); if (isIgnoreHostnameVerification) { - return HttpClients.custom().setHostnameVerifier((X509HostnameVerifier) NoopHostnameVerifier.INSTANCE).build(); + return HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE).build(); } else { return HttpClients.createDefault(); } diff --git a/pom.xml b/pom.xml index 3e3ed2bd3b..af0f8e6e45 100644 --- a/pom.xml +++ b/pom.xml @@ -1309,8 +1309,8 @@ ${github.openfeign.version} - org.apache.httpcomponents.client5 - httpclient5 + org.apache.httpcomponents + httpclient ${apache.http.client.version} @@ -2054,7 +2054,7 @@ 11.0 1.1.1 1.2 - 5.2.1 + 4.5.6 4.4.13 4.5.10