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

Support sending client certificates for remote verification over SSL/TLS #24

Open
ohookins opened this issue Apr 2, 2013 · 4 comments
Labels

Comments

@ohookins
Copy link

ohookins commented Apr 2, 2013

I'm not sure if this is a limitation of Eventmachine so feel free to let me know if so, but currently there is no way to send the client certificate to the peer for verification when using an SSL connection.

You end up seeing something like this:

Apr  2 13:51:05 ubuntu stunnel: LOG5[21813:3073223488]: Service amqp-server accepted connection from 192.168.1.10:44798
Apr  2 13:51:05 ubuntu stunnel: LOG3[21813:3073223488]: SSL_accept: 140890C7: error:140890C7:SSL routines:SSL3_GET_CLIENT_CERTIFICATE:peer did not return a certificate
Apr  2 13:51:05 ubuntu stunnel: LOG5[21813:3073223488]: Connection reset: 0 bytes sent to SSL, 0 bytes sent to socket

On a somewhat related note, if you enable :verify_peer: true in the SSL configuration hash, this also fails as amq-client does not implement the ssl_verify_peer() method that Eventmachine will call on the EventMachine::Connection class. This causes the ruby-amqp end to disconnect early right now, I guess because nothing is handling the verification.

@michaelklishin
Copy link
Member

EventMachine probably supports this but the only way to know is by reading the source.

@ohookins
Copy link
Author

ohookins commented Apr 2, 2013

@ohookins
Copy link
Author

ohookins commented Apr 2, 2013

Actually it does seem to work, if you put the client certificate first in the cert chain file.

Anyhoo, verify peer would still be nice. Is there a nice way of exposing this to the connection object or something else?

@michaelklishin
Copy link
Member

Adding peer verification should be pretty straightforward, feel free to submit a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants