Skip to content

Commit 2469b53

Browse files
committed
Added ssl_verification parameter to the connections configuration
1 parent 00e3bfe commit 2469b53

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/DependencyInjection/Configuration.php

+4
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ private function getConnectionsNode(): NodeDefinition
9393
->prototype('scalar')
9494
->end()
9595
->end()
96+
->scalarNode('ssl_verification')
97+
->defaultNull()
98+
->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')
99+
->end()
96100
->scalarNode('profiling')
97101
->defaultTrue()
98102
->info('Enable/disable profiling.')

src/Manager/ConnectionManager.php

+3
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ public function getClient(): Client
112112
if (!$this->client) {
113113
$clientBuilder = ClientBuilder::create();
114114
$clientBuilder->setHosts($this->connectionSettings['hosts']);
115+
if (isset($this->connectionSettings['ssl_verification'])) {
116+
$clientBuilder->setSSLVerification($this->connectionSettings['ssl_verification']);
117+
}
115118
if ($this->tracer && $this->kernelDebug) {
116119
$clientBuilder->setTracer($this->tracer);
117120
}

0 commit comments

Comments
 (0)