-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[jruby] support setting TLS protocols + rename ssl_cipher_list #2899
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
Conversation
follow Java naming as we already do with keystore/truststore ... Context now does the string split and accepts an Array
|
Thanks for the PR. Not sure about JRuby's OpenSSL implementation, but with MRI OpenSSL, there are two cipher functions, one to set ciphers for TLSv1.2 and below ( Re TLSv1.3, are there systems that are only allowing it as a protocol? I assumed that TLSv1.2 would be considered an 'allowed' protocol for at least a few years. Maybe an incorrect assumption... |
|
Thanks Greg for the review 💜
as noted in the description Puma is already using Java specific concepts to setup MiniSSL on JRuby ( the 2 functions in OpenSSL are a bit unfortunate esp. the fact that there are 2 also leaked into Ruby OpenSSL APIs. with Java there's one way to set ciphers for both 1.2 and 1.3 - the API has been named
the |
Long story. So, I think it's time to add something like So, any thoughts re adding that, and might it be an option to using Note that I'm using the same strings to reference TLS versions as the code here, and it would be easy to assemble a string (or array) like |
I'm fine with One (very edgy) downside of the |
…2899) * [jruby] support setting TLS protocols + rename ssl_cipher_list follow Java naming as we already do with keystore/truststore ... Context now does the string split and accepts an Array * [test] cipher_suites and protocols behavior * [jruby] support new TLS settings in DSL
Description
This PR is JRuby specific and follows up on TLS 1.3 support.
To control protocol selection Puma only has
no_tlsv1andno_tlsv1_1, these are insufficient when fine grained control is needed (e.g. only enable 1.3).I've decided to add
MiniSSL::Context#protocolswhich accepts an array or a","delimited string (a similar logic existed for setting the cipher suites and has been moved to .rb from the native Java bits).Setting
Context#protocolsexplicitly takes precedence over the previously existingno_tlsv1_1ways.The
MiniSSL::Contextproperties all follow the underlying Java conventions thus also went ahead and "renamed"ssl_cipher_listtocipher_suitesin a non-breaking way.Your checklist for this pull request
If this PR doesn't need tests (docs change), I added[ci skip]to the title of the PR.If this closes any issues, I have added "Closes#issue" to the PR description or my commit messages.