diff --git a/src/Queue/Connection/ConnectionFactory.php b/src/Queue/Connection/ConnectionFactory.php index f5ccad0e..e6641b95 100644 --- a/src/Queue/Connection/ConnectionFactory.php +++ b/src/Queue/Connection/ConnectionFactory.php @@ -159,9 +159,14 @@ protected static function getReadWriteTimeout(AMQPConnectionConfig $config): flo protected static function getSslOptions(AMQPConnectionConfig $config): array { + $path = null; + if (method_exists($config, 'getSslCaPath')) { + $path = $config->getSslCaPath(); + } + return array_filter([ 'cafile' => $config->getSslCaCert(), - 'capath' => $config->getSslCaPath(), + 'capath' => $path, 'local_cert' => $config->getSslCert(), 'local_pk' => $config->getSslKey(), 'verify_peer' => $config->getSslVerify(),