summaryrefslogtreecommitdiffstats
path: root/ms/neng/src/main/java
diff options
context:
space:
mode:
authorBT2983 <BT2983@att.com>2018-09-18 18:57:28 -0600
committerBT2983 <BT2983@att.com>2018-09-18 18:57:28 -0600
commit01058306bbd691ff507e2e0b7cc13848520b1a85 (patch)
tree748e2e0e55905cfc817881215e76fa00b855ba1b /ms/neng/src/main/java
parent758bc233c125d2ffec0bf16618747af747aafa45 (diff)
naming ms - interface testing updates.
Added additional configurable properties for interfaces, and to work with no certificates or https. Change-Id: I680b10ce21c41cecf6c32ddbbcb1c33967fff2e0 Issue-ID: CCSDK-342 Signed-off-by: BT2983 <BT2983@att.com>
Diffstat (limited to 'ms/neng/src/main/java')
-rw-r--r--ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
index 392567b7..e93675bf 100644
--- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
+++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/service/extinf/impl/PolicyFinderServiceImpl.java
@@ -27,7 +27,9 @@ import java.security.cert.X509Certificate;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
+import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
import org.apache.http.impl.client.CloseableHttpClient;
@@ -142,7 +144,8 @@ public class PolicyFinderServiceImpl implements PolicyFinder {
TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true;
SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom()
.loadTrustMaterial(null, acceptingTrustStrategy).build();
- SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext);
+ HostnameVerifier verifier = (String arg0, SSLSession arg1) -> true;
+ SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext, verifier);
CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(csf).build();
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory();
requestFactory.setHttpClient(httpClient);