Fix A1 controller to trust all certs 50/3950/1
authorRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 2 Jun 2020 09:57:29 +0000 (11:57 +0200)
committerRehanRaza <muhammad.rehan.raza@est.tech>
Tue, 2 Jun 2020 09:57:36 +0000 (11:57 +0200)
Change-Id: Ifc78b9bd6faab5edf944d66aa3d3fa4bc4aca55f
Issue-ID: NONRTRIC-241
Signed-off-by: RehanRaza <muhammad.rehan.raza@est.tech>
sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/o_ran_sc/nonrtric/sdnc_a1/northbound/restadapter/RestAdapterImpl.java

index d317e56..928b65f 100644 (file)
@@ -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();