diff --git a/README.md b/README.md index 843cb43..3671f59 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ pimcore_elasticsearch_client: ssl_key: 'path/to/ssl/key' ssl_cert: 'path/to/ssl/cert' ssl_password: 'secretePW' - ssl_verification: false #false is the default value + ssl_verification: false #true is the default value http_options: proxy: 'http://localhost:8125' cloud_id: '123456789' diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 46843bd..9475d63 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -63,7 +63,7 @@ public function getConfigTreeBuilder() ->info('If private key and certificate require a password (default: null)') ->end() ->booleanNode('ssl_verification') - ->info('Enable or disable the SSL verification (default: false)') + ->info('Enable or disable the SSL verification (default: true)') ->end() ->arrayNode('http_options') ->prototype('scalar')->end() diff --git a/src/EsClientFactory.php b/src/EsClientFactory.php index 6cd7ad4..b16e64c 100644 --- a/src/EsClientFactory.php +++ b/src/EsClientFactory.php @@ -45,10 +45,10 @@ public static function create(LoggerInterface $logger, array $configuration): Cl $builder ->setSSLKey($configuration['ssl_key'], $configuration['ssl_password'] ?? null) ->setSSLCert($configuration['ssl_cert'], $configuration['ssl_password'] ?? null); + } - if (isset($configuration['ssl_verification'])) { - $builder->setSSLVerification($configuration['ssl_verification']); - } + if (isset($configuration['ssl_verification'])) { + $builder->setSSLVerification($configuration['ssl_verification']); } if (isset($configuration['http_options'])) {