From 1df19340255bf2a1c1a7a8d60c96e5a96683c03b Mon Sep 17 00:00:00 2001 From: RehanRaza Date: Tue, 2 Jun 2020 11:57:29 +0200 Subject: [PATCH] Fix A1 controller to trust all certs Change-Id: Ifc78b9bd6faab5edf944d66aa3d3fa4bc4aca55f Issue-ID: NONRTRIC-241 Signed-off-by: RehanRaza --- .../nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java index d317e56a..928b65fe 100644 --- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java +++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java @@ -34,7 +34,7 @@ import java.util.Properties; import org.apache.http.client.HttpClient; 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.conn.ssl.TrustAllStrategy; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.slf4j.Logger; @@ -87,7 +87,7 @@ public class RestAdapterImpl implements RestAdapter { SSLContexts.custom() .loadKeyMaterial(ResourceUtils.getFile(properties.getProperty("key-store")), keystorePassword.toCharArray(), keystorePassword.toCharArray()) - .loadTrustMaterial(null, new TrustSelfSignedStrategy()) + .loadTrustMaterial(null, new TrustAllStrategy()) .build(), NoopHostnameVerifier.INSTANCE); HttpClient client = HttpClients.custom().setSSLSocketFactory(scsf).build(); -- 2.16.6