-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with release 2.3.1 - Use of AMQPSSLConnection class #55
Comments
Hi! Example configuration connection in my project
It's work If you are using a secure connection, then it is logical to assume that you configure the connection context yourself |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
In the update to version 2.3.1 is a little configuration bug.
Problem:
The validation does not approve of the
ssl_options
setting for a connection configured by the AMQPSSLConnection class. (https://github.com/php-amqplib/php-amqplib/blob/v2.9.0/PhpAmqpLib/Connection/AMQPSSLConnection.php)Validator checks configured connection options against the default connection options set at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/master/Configuration.php#L35
The newly added
ssl_options
property misses here.Solution:
ssl_options
property to the default configuration at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/master/Configuration.php#L35. Set to NULL.You should still be able to use the AMQPStreamConnection class when setting the
ssl_context
option. This is prevented by the new check now at https://github.com/mikemadisonweb/yii2-rabbitmq/blob/2.3.1/Configuration.php#L279. This check should allow AMQPStreamConnection to be used in combination with thessl_context
option.Explanation
I can see the latest commit was to solve a SSL problem:
2c5552a
This made it mandatory to use the AMQPSSLConnection class. (https://github.com/php-amqplib/php-amqplib/blob/v2.9.0/PhpAmqpLib/Connection/AMQPSSLConnection.php)
Before this update i would set the ssl_context option like so:
This results in the following exception:
Now you would get this error first:
So if i change the configuration to use the
AMQPSSLConnection::class
and set thessl_options
i get the following:Notice we now have to use ssl_options which will create the context for us instead of making the context ourselves.
Now i get the following error:
Which is to conclude that either the
ssl_options
property has to be added to the default configuration (constant DEFAULTS)The text was updated successfully, but these errors were encountered: