Skip to content

Commit

Permalink
allow setting of ssl_verification without ssl_key...
Browse files Browse the repository at this point in the history
+ fix doc (ssl_verification is by default true)
  • Loading branch information
ctippler authored and aryaantony92 committed Oct 12, 2023
1 parent 7db2996 commit 50f6228
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions src/EsClientFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down

0 comments on commit 50f6228

Please sign in to comment.