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

TLS connection using custom certification file. #7

Open
redboltz opened this issue Aug 14, 2014 · 3 comments
Open

TLS connection using custom certification file. #7

redboltz opened this issue Aug 14, 2014 · 3 comments

Comments

@redboltz
Copy link

Hi,
I'd like use custom certification file for creating TLS connection. The target server is using a server certification file signed by private CA. The client has the private CA's certification file named cacert.pem.

Does websocket-eventmachine-client provide the fuctionality to set/add certification file?

I'd like to do something like as follows with websocket-eventmachine-client library:
http://ruby-doc.org/stdlib-2.0/libdoc/openssl/rdoc/OpenSSL/X509/Store.html

@imanel
Copy link
Owner

imanel commented Aug 14, 2014

No yet - it would require passing parameter to eventmachine according to spec. I have limited time to work on it this week so you could either send pull request or I will fix it at beginning of next week :)

@redboltz
Copy link
Author

Thank you for your quick response. Your links are very helpful to understand the library mechanism. I forked the repository and start developing.

In order to verify the server certificate signed by private CA, the client needs to have the private CA's certificate. It's ok. But I couldn't find the way to set the private CA's certificate to the client program.

I've checked the OpenSSL API document, then I found the API SSL_CTX_load_verify_locations.
https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html

That is the API to fit my purpose.

However, I couldn't find the API in EventMachine corresponding to SSL_CTX_load_verify_locations.
I think that I need to study EventMachine's underlying libraries...

@imanel
Copy link
Owner

imanel commented Sep 2, 2014

I believe it's related to eventmachine/eventmachine#378 - unfortunately this application is not place for implementing hacks for EventMachine. I will keep it open for now as remainder to check when it will be done upstream.

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

No branches or pull requests

2 participants