Skip to content

Commit

Permalink
Added ssl_verification parameter to the connections configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
pmishev committed Jul 31, 2023
1 parent 00e3bfe commit 2469b53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ private function getConnectionsNode(): NodeDefinition
->prototype('scalar')
->end()
->end()
->scalarNode('ssl_verification')
->defaultNull()
->info('Set to true to enable SSL certificate verification and use the default CA bundle provided by operating system or provide the path to a CA bundle to enable verification using a custom certificate')
->end()
->scalarNode('profiling')
->defaultTrue()
->info('Enable/disable profiling.')
Expand Down
3 changes: 3 additions & 0 deletions src/Manager/ConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public function getClient(): Client
if (!$this->client) {
$clientBuilder = ClientBuilder::create();
$clientBuilder->setHosts($this->connectionSettings['hosts']);
if (isset($this->connectionSettings['ssl_verification'])) {
$clientBuilder->setSSLVerification($this->connectionSettings['ssl_verification']);
}
if ($this->tracer && $this->kernelDebug) {
$clientBuilder->setTracer($this->tracer);
}
Expand Down

0 comments on commit 2469b53

Please sign in to comment.