Skip to content
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

Make OpenSSL support optional / dependent on rabbitmq-c #67

Closed
kblaschke opened this issue Sep 9, 2013 · 1 comment · Fixed by #81
Closed

Make OpenSSL support optional / dependent on rabbitmq-c #67

kblaschke opened this issue Sep 9, 2013 · 1 comment · Fixed by #81

Comments

@kblaschke
Copy link
Contributor

Currently, SimpleAmqpClient implicitly requires a rabbitmq-c library compiled with SSL support. In environments where the complexity of SSL support is not a requirement, developers are currently forced to link both libraries against OpenSSL. While some people may argue this is not much of an overhead and OpenSSL is readily available on many platforms, it'd still be cleaner to keep SimpleAmqpClient in line with rabbitmq-c and have optional SSL support.

I would contribute the required changes, but before this, like to discuss the best way to implement it. My suggestion is:

  • In CMakeLists.txt, check for the availability of amqp_ssl_socket.h. If the file exists, provide the user with an option to enable of disable SSL support, and default it to "ON".
  • Split up the AmqpClient::Channel class, and move the SSL-specific create() function and the associated constructor into a derived class, e.g. SecureChannel.
  • If SSL support is ON, add the SecureChannel implementation and header files to the build.
@alanxz
Copy link
Owner

alanxz commented Sep 9, 2013

This all sounds good to me. Be sure to also update the install command in CMakeLists.txt so that the SecureChannel.h conditionally gets installed.

alanxz added a commit that referenced this issue Feb 5, 2014
Conditionally enable SSL support in SimpleAmqpClient based on SSL support in
rabbitmq-c.

This fixes #67
@alanxz alanxz closed this as completed in 7651d5b Feb 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants