|
41 | 41 | import org.apache.http.client.CredentialsProvider; |
42 | 42 | import org.apache.http.conn.ssl.NoopHostnameVerifier; |
43 | 43 | import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
| 44 | +import org.apache.http.conn.ssl.TrustAllStrategy; |
44 | 45 | import org.apache.http.conn.ssl.TrustSelfSignedStrategy; |
45 | 46 | import org.apache.http.impl.auth.BasicScheme; |
46 | 47 | import org.apache.http.impl.client.BasicCredentialsProvider; |
@@ -648,7 +649,7 @@ protected void _solrUrlComputate() throws Exception { |
648 | 649 | **/ |
649 | 650 | protected void _clientSolrComputate() throws Exception { |
650 | 651 | SSLContextBuilder builder = new SSLContextBuilder(); |
651 | | - builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); |
| 652 | + builder.loadTrustMaterial(null, TrustAllStrategy.INSTANCE); |
652 | 653 | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE); |
653 | 654 | UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(solrUtilisateur, solrMotDePasse); |
654 | 655 | CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); |
@@ -681,7 +682,7 @@ protected void _solrUrlFiware() throws Exception { |
681 | 682 | protected void _clientSolrFiware() throws Exception { |
682 | 683 | if(StringUtils.isNotBlank(solrUrlFiware)) { |
683 | 684 | SSLContextBuilder builder = new SSLContextBuilder(); |
684 | | - builder.loadTrustMaterial(null, new TrustSelfSignedStrategy()); |
| 685 | + builder.loadTrustMaterial(null, TrustAllStrategy.INSTANCE); |
685 | 686 | SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE); |
686 | 687 | UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(solrUtilisateur, solrMotDePasse); |
687 | 688 | CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); |
|
0 commit comments