You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable TLS, ext-amqp does not support reading the CA store of the OS automatically (nor the OpenSSL one used by PHP for stream wrappers). Instead, it requires configuring it either in the php.ini in amqp.cacert or by passing the cacert option when instantiating the connection.
It would be great if the buildpack could automatically configure this amqp.cacert parameter to point to the default cert file on the system.
For reference, running php -r 'var_dump(openssl_get_cert_locations()["default_cert_file"]);' in a one-off dyno shows it as being at /usr/lib/ssl/cert.pem.
The text was updated successfully, but these errors were encountered:
So the trouble is that /usr/lib/ssl/cert.pem does not exist on Ubuntu systems. Instead, OpenSSL loads specific CAs from default_cert_dir if told to do so, and that's the behavior most programs and libraries rely upon these days.
However, there is now an API to enable loading of default certs in librabbitmq: alanxz/rabbitmq-c#790 - it calls SSL_CTX_set_default_verify_paths() under the hood, which is exactly what you want ;)
I think the best solution here is for ext-amqp to implement this API (once it's in a release). Maybe even by default if amqp.cacert is not set.
The library might also benefit from a way to set a directory instead of a file.
To enable TLS,
ext-amqp
does not support reading the CA store of the OS automatically (nor the OpenSSL one used by PHP for stream wrappers). Instead, it requires configuring it either in the php.ini inamqp.cacert
or by passing thecacert
option when instantiating the connection.It would be great if the buildpack could automatically configure this
amqp.cacert
parameter to point to the default cert file on the system.For reference, running
php -r 'var_dump(openssl_get_cert_locations()["default_cert_file"]);'
in a one-off dyno shows it as being at/usr/lib/ssl/cert.pem
.The text was updated successfully, but these errors were encountered: