diff options
-rw-r--r-- | ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientFactory.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientFactory.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientFactory.java index 00c1558..bc286fd 100644 --- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientFactory.java +++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/client/HttpClientFactory.java @@ -24,6 +24,7 @@ import org.apache.http.ssl.SSLContextBuilder; import javax.net.ssl.SSLContext; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; +import java.security.GeneralSecurityException; /** * HttpClient @@ -31,10 +32,10 @@ import java.security.cert.X509Certificate; public class HttpClientFactory { - public static CloseableHttpClient getSSLClientFactory() throws Exception { + public static CloseableHttpClient getSSLClientFactory() throws GeneralSecurityException { SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() { - //信任所有 + //Trust all public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { return true; |