postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Implemented support for SSL. #209

Closed bakkerthehacker closed 11 years ago

bakkerthehacker commented 11 years ago

Requested in Issue #89

I have implemented AMQP over SSL.

esk525 had implemented SSL a while ago but his changes were based on code from a year ago: https://github.com/esk525/node-amqp

I used his object proxy to make the AMQP connection inherit all the behavior of the net or tls connection. I also moved the listeners from the constructor to an addAllListeners function, which is why the diff looks like its moving a lot of other code.

If there are any suggestions or concerns, I would appreciate hearing back.

bakkerthehacker commented 11 years ago

this is an error in your certifiactes, specifically your certifiate authority.
ensure that your server and client are both using the same certificate authority and that all the certificates are signed throught that authority.

you can temporarily get around the issue, and check that the rest of your system works by setting rejectUnauthorized to false.

bakkerthehacker commented 11 years ago

Allow me to quote from the SSL documentation I wrote:

"The key, certificate, and certificate authority files must be in pem format. "

Ensure your certs are in that format.

Also, this thread isn't really meant to be a help thread. I would suggest posting on the SSL issue thread here https://github.com/postwait/node-amqp/issues/89 or making a post on a help forum such as Stack Overflow.

combatpoodle commented 11 years ago

@bakkerthehacker You are my hero.