amqp.cr icon indicating copy to clipboard operation
amqp.cr copied to clipboard

Add TLS support

Open jgaskins opened this issue 6 years ago • 4 comments

Adding TLS/SSL support to network clients in Crystal is usually as simple as wrapping a Socket in an OpenSSL::SSL::Context::Client. In this case, I also had to change the types of the sockets to IO::Buffered (a superclass shared by Socket and OpenSSL::SSL::Context::Client) instead of making it a union type between the two classes.

This PR also adds support for taking a URL (in either String or URI form). I just found it easier to test this when I didn't have to slice up my CloudAMQP or Amazon MQ URLs manually. :-)

Also, this PR contains @carlhoerberg's commit from #30 (I needed it because I'm on 0.27). When that PR is merged, I'll merge master into this branch so it won't be in the diff.

jgaskins avatar Dec 29 '18 00:12 jgaskins

Hi @datanoise, Is this repo still being maintained? There's a backlog of PRs and I'd hate to see it fall behind. Im sure one of the project contributors could take over as maintainer.

DougEverly avatar Mar 10 '19 01:03 DougEverly

@DougEverly here's a maintained amqp library: https://github.com/cloudamqp/amqp-client.cr

carlhoerberg avatar Mar 10 '19 09:03 carlhoerberg

@carlhoerberg Looks like we're both maintaining our own forks. https://github.com/datanoise/amqp.cr/compare/master...jgaskins:master

Should we combine our efforts?

jgaskins avatar Mar 10 '19 17:03 jgaskins

@jgaskins no, we've abandoned it and instead built a new library from the ground up: https://github.com/cloudamqp/amqp-client.cr

carlhoerberg avatar Mar 11 '19 08:03 carlhoerberg