2 ms·
From my POV: > TLS requires ALPN. Supported by recent versions of Ruby pretty well, but as you say, older versions, not so well. > Setting up more advanced T
by ioquatix 8y ago
From my POV:
> TLS requires ALPN.
Supported by recent versions of Ruby pretty well, but as you say, older versions, not so well.
> Setting up more advanced TLS is highly undocumented.
It was slightly tricky with Ruby but it provides the appropriate callbacks and the documentation is reasonable: https://github.com/socketry/falcon/blob/940c25f4d19e9ad900cee4827e771b89c3a3a82c/lib/falcon/hosts.rb#L107-L109 https://github.com/socketry/falcon/blob/940c25f4d19e9ad900ce...
> How do you test TLS?
I specifically solved this problem by using a self-signed local certificates and certificates store: https://github.com/socketry/async-rspec/blob/master/lib/async/rspec/ssl.rb https://github.com/socketry/async-rspec/blob/master/lib/asyn...
That code makes appropriate contexts available for client and server in unit testing.
Additionally I hacked this together: https://github.com/socketry/localhost https://github.com/socketry/localhost
It generates local self-signed certificates which you can easily use with a web browser. It solves the "localhost development via https" problem.