Skip to content

Commit 300662d

Browse files
committed
Add TrustAllStrategy.INSTANCE for solr and OpenShift Local
1 parent e1c091a commit 300662d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/computate/frFR/java/ConfigSite.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import org.apache.http.client.CredentialsProvider;
4242
import org.apache.http.conn.ssl.NoopHostnameVerifier;
4343
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
44+
import org.apache.http.conn.ssl.TrustAllStrategy;
4445
import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
4546
import org.apache.http.impl.auth.BasicScheme;
4647
import org.apache.http.impl.client.BasicCredentialsProvider;
@@ -648,7 +649,7 @@ protected void _solrUrlComputate() throws Exception {
648649
**/
649650
protected void _clientSolrComputate() throws Exception {
650651
SSLContextBuilder builder = new SSLContextBuilder();
651-
builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
652+
builder.loadTrustMaterial(null, TrustAllStrategy.INSTANCE);
652653
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE);
653654
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(solrUtilisateur, solrMotDePasse);
654655
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
@@ -681,7 +682,7 @@ protected void _solrUrlFiware() throws Exception {
681682
protected void _clientSolrFiware() throws Exception {
682683
if(StringUtils.isNotBlank(solrUrlFiware)) {
683684
SSLContextBuilder builder = new SSLContextBuilder();
684-
builder.loadTrustMaterial(null, new TrustSelfSignedStrategy());
685+
builder.loadTrustMaterial(null, TrustAllStrategy.INSTANCE);
685686
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(builder.build(), NoopHostnameVerifier.INSTANCE);
686687
UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(solrUtilisateur, solrMotDePasse);
687688
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();

0 commit comments

Comments
 (0)