-
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
Mimic MRI's openssl when jopenssl require fails. #41
base: master
Are you sure you want to change the base?
Conversation
Some libraries (such as RubyGems) rescues openssl load errors and adjust their behavior depending if the openssl is properly required. However, prior this commit, require 'openssl' succeeded just fine, but the subsequent requires failed, which makes RubyGems (and similar) to fail unexpectedly.
Actually, RubyGems checks for [1] https://github.com/rubygems/rubygems/blob/master/lib/rubygems/security.rb#L13 |
thanks @voxik, have you tried the other way ... submitting a patch to RGs itself explaining the issue? |
@kares No, I have not, since I don't believe that RubyGems are the only library in the world using Ruby's OpenSSL. There are probably others which are doing similar check. And to be honest, I believe that most of the SW is tested against MRI and this is MRI compatibility issue. |
Actually, since output of jruby/jruby#2894 is totally different then anticipated, this might become less critical. |
@voxik disagree ... most code does |
You describe almost precisely what RubyGems does. But if you check the links I provide above, you'd notice that they in addition check what actually was not loaded. |
@voxik did check I was asking for another example this being done in the wild (if you read my comment), until than we shall assume only RGs does the "hack" and try to come up with a solution on their side ... |
@kares Thanks for opening the RubyGems ticket. Hopefully they will answer soon :) |
6320e12
to
dc28d09
Compare
Some libraries (such as RubyGems [1]) rescues openssl load errors and
adjust their behavior depending if the openssl is properly required.
However, prior this commit, require 'openssl' succeeded just fine, but
the subsequent requires failed, which makes RubyGems (and similar) to
fail unexpectedly.
Please note that I submitted similar jruby/jruby/pull/2894 for 1.7 branch.
[1] https://github.com/rubygems/rubygems/blob/master/lib/rubygems/security.rb#L14