diff --git a/src/main/java/liquibase/ext/opensearch/database/OpenSearchConnection.java b/src/main/java/liquibase/ext/opensearch/database/OpenSearchConnection.java index eae6e1b..74ad9cd 100644 --- a/src/main/java/liquibase/ext/opensearch/database/OpenSearchConnection.java +++ b/src/main/java/liquibase/ext/opensearch/database/OpenSearchConnection.java @@ -12,6 +12,7 @@ import org.apache.hc.client5.http.impl.nio.PoolingAsyncClientConnectionManagerBuilder; import org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder; import org.apache.hc.client5.http.ssl.NoopHostnameVerifier; +import org.apache.hc.client5.http.ssl.TrustAllStrategy; import org.apache.hc.core5.http.HttpHost; import org.apache.hc.core5.http.nio.ssl.TlsStrategy; import org.apache.hc.core5.reactor.ssl.TlsDetails; @@ -143,7 +144,7 @@ private void connect() { try { sslcontext = SSLContextBuilder .create() - .loadTrustMaterial(null, (chains, authType) -> true) + .loadTrustMaterial(null, new TrustAllStrategy()) .build(); } catch (final NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) { throw new RuntimeException(e);