Description
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.
-
As part of HTTP::Server, then you just need to allow the user to specify :ssl = true or something in the .serve method.
-
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...
-
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 :)