diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml index 9ebf07202e..21549bb117 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/pom.xml @@ -173,10 +173,9 @@ - - org.apache.httpcomponents - httpclient + org.apache.httpcomponents.client5 + httpclient5 org.apache.felix diff --git a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java index 02a7606b45..71dab6fb65 100644 --- a/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java +++ b/components/application-mgt/io.entgra.device.mgt.core.application.mgt.core/src/main/java/io/entgra/device/mgt/core/application/mgt/core/impl/SubscriptionManagerImpl.java @@ -40,6 +40,7 @@ import org.apache.http.conn.ssl.TrustSelfSignedStrategy; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; +import org.apache.http.ssl.TrustStrategy; import org.json.JSONArray; import org.json.JSONObject; import io.entgra.device.mgt.core.apimgt.application.extension.dto.ApiApplicationKey; @@ -120,6 +121,8 @@ import java.net.URL; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -1385,7 +1388,12 @@ public class SubscriptionManagerImpl implements SubscriptionManager { private CloseableHttpClient getHttpClient() throws ApplicationManagementException { try { SSLContextBuilder builder = new SSLContextBuilder(); - builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); + builder.loadTrustMaterial(null, new TrustStrategy() { + @Override + public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { + return true; + } + }); SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build()); return HttpClients.custom().setSSLSocketFactory(sslsf).useSystemProperties().build(); } catch (NoSuchAlgorithmException e) { diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml index 0e16c5ef26..808841bd4b 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.userstore.role.mapper/pom.xml @@ -129,22 +129,10 @@ - - org.eclipse.osgi - org.eclipse.osgi - - - org.eclipse.osgi - org.eclipse.osgi.services - org.wso2.carbon org.wso2.carbon.core - - org.wso2.carbon - org.wso2.carbon.logging - org.wso2.carbon org.wso2.carbon.utils @@ -193,7 +181,6 @@ org.wso2.carbon org.wso2.carbon.securevault - test @@ -216,11 +203,6 @@ org.wso2.carbon.queuing test - - javax.xml.bind - jaxb-api - test - io.entgra.device.mgt.core io.entgra.device.mgt.core.server.bootup.heartbeat.beacon diff --git a/pom.xml b/pom.xml index 9bd06cbf6d..3e3ed2bd3b 100644 --- a/pom.xml +++ b/pom.xml @@ -594,7 +594,6 @@ - org.testng testng