alanxz/rabbitmq-c — pull request #17 by msteinert (2012-05-10 19:40:07+00:00)
Title: Add plumbing for SSL/TLS support

This change abstracts out the networking functions so that the user can provide an SSL/TLS implementation.

Callback functions replace `writev()`, `send()`, and `recv()` (there is also a callback for error reporting). The default interface remains unchanged. If the user wants to create a SSL/TLS connection they first negotiate the connection and then use the new function `amqp_set_sockfd_full()` to provide the networking implementation for their SSL/TLS library. The user may provide an optional pointer to data that is passed through to the networking functions.

My [ssl-devel](https://github.com/msteinert/rabbitmq-c/commits/ssl-devel) branch implements SSL/TLS with CyaSSL, OpenSSL, PolarSSL & GnuTLS backends (NSS & MatrixSSL might also be interesting). The changes on that branch require this pull request as well as the changes in pull request #16. I'll have to rebase these changes based on what you decide to do with my other pull requests.

I tried to follow the path of least surprise by not modifying any existing interfaces or programming paradigms. It might be nice to clean up the API a bit but I wasn't sure how set in stone it is at this point.

Signed-off-by: Michael Steinert