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

SSL Support #11

Open
bararchy opened this issue Jun 18, 2015 · 2 comments
Open

SSL Support #11

bararchy opened this issue Jun 18, 2015 · 2 comments

Comments

@bararchy
Copy link
Contributor

Right now, the best OpenSSL lib is @datanoise repo at https://github.com/datanoise/openssl.cr .
Crystals SSL binding are half finished until this will be PRed.

I know Amethyst is using Crystal's HTTP server, the question is what kind of SSL support does the server has ? maybe we should wait for openssl.cr to be merged before adding an SSL option ?

Anyway, SSL can be implemented in a few ways.

  1. As part of HTTP::Server, then you just need to allow the user to specify :ssl = true or something in the .serve method.

  2. You can bypass HTTP::Server and allow the user to pass down a SSLSocket for you to use (this means the user will need to get from you a TCPSocket and upgrade it using OpenSSL::Context etc...

  3. You can implement some kind of Middleware to handle the SSLSocket upgrade.

From those three, I guess 1 is the easiest, but not sure when this is going to happen, this also depends on a) @datanoise, b) @asterite, then you :)

@Codcore
Copy link
Collaborator

Codcore commented Jun 20, 2015

@bararchy Crystal HTTP::Server actually supports ssl

@bararchy
Copy link
Contributor Author

@Codcore Yeha, but the SSLSocket is really low on options right now, the default settings are insecure.

Non the less, if you can start building the hooks it could be really nice :)

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