|
@@ -21,9 +21,9 @@ import org.apache.http.impl.client.HttpClients;
|
|
|
import javax.net.ssl.SSLContext;
|
|
|
|
|
|
import java.io.*;
|
|
|
-import java.net.HttpURLConnection;
|
|
|
-import java.net.URL;
|
|
|
+
|
|
|
import java.security.cert.CertificateException;
|
|
|
+import java.security.cert.X509Certificate;
|
|
|
import java.text.DecimalFormat;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -208,8 +208,8 @@ public class FileSECUtils {
|
|
|
|
|
|
private static CloseableHttpClient buildSSLCloseableHttpClient() throws Exception {
|
|
|
SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, new TrustStrategy() {
|
|
|
- @Override
|
|
|
- public boolean isTrusted(java.security.cert.X509Certificate[] x509Certificates, String s) throws CertificateException {
|
|
|
+ // 信任所有
|
|
|
+ public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException {
|
|
|
return true;
|
|
|
}
|
|
|
}).build();
|