-
Notifications
You must be signed in to change notification settings - Fork 80
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
Expose SSLContext#ssl_protocol as SSLParams#protocol #104
Conversation
With this commit we allow the choice of ssl protocol to be specified by the user. This allows for mitigation of protocol-based attacks such as the current SSLv3 POODLE by specifying SSLParams.new(:protocol => :TLSv1_2, ...)
On more careful thought I'm not sure if this is general enough, as really what I would to do is the equivalent of Maybe supplying a Proc that's called on the ctx, enabling something like |
ACK that this has been seen, and is being considered. Something must have happened with an app that you work on to trigger this, correct? Are you in a position to elaborate? Rule 1: it must seem likely that existing users will not be affected by any change (keep all defaults). To date, we claim support for Ruby 1.8.5 .... 2.x Do all of those SSL constants exist in all Ruby versions? The current thought is that a check that the user is doing something sane might be added. So, raise if the user has done:
Because that is very likely to happen. I will try and run some sanity check / tests this weekend. |
It's intended as a defence against SSLv3/POODLE attacks https://securityblog.redhat.com/2014/10/15/poodle-a-ssl3-vulnerability-cve-2014-3566/ The intent is to be able to express 'don't ever negotiate to use the SSLv3 protocol', as it's the simplest mitigation to this, and the other known/suspected flaws in SSLv3. I'm not sure what the best way of exposing the world of openssl options to the user is, this seemed the most obvious first pass, but with reflection it started to feel too specific. |
You are not enthusiastic about this solution. Neither am I at this point. Will you close this PR? Or do you intend to enhance it? |
I was hoping for some feedback from you on what would make exposing the SSLContext for this level of configuration fit with the current interface of the stomp gem. We've worked around this for our app with a somewhat unpleasant monkey patch, so we don't need it for now. Closing. |
How about providing a way for the gem user to pass parameters to Would that work for you? I am still puzzling over your original PR. One line of code is: ctx.ssl_protocol = @ssl.protocol I do not see OpenSSL::SSL::SSLContext#ssl_protocol in any of the 7 or 8 Also, what does your 'unpleasant monkey patch' look like ? On 11/03/2014 06:20 AM, Richard Clamp wrote:
|
Yeah, when attempting to use your PR from one of my test clients, I get: D, [2014-11-03T12:21:14.223888 #16046] DEBUG -- : SSL Connect Fail On 11/03/2014 06:20 AM, Richard Clamp wrote:
|
With this commit we allow the choice of ssl protocol to be specified by the
user. This allows for mitigation of protocol-based attacks such as the current
SSLv3 POODLE by specifying SSLParams.new(:protocol => :TLSv1_2, ...)