Skip to content
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

OpenSSL Deprecations #155

Closed
gmallard opened this issue Nov 21, 2018 · 2 comments
Closed

OpenSSL Deprecations #155

gmallard opened this issue Nov 21, 2018 · 2 comments

Comments

@gmallard
Copy link

The more recent Ruby documentation for OpenSSL::SSL::SSLContext says:

The cert, key, and extra_chain_cert attributes are deprecated. It is recommended to use add_certificate instead.

Review the gem's SSL support with the idea of addressing these deprecations.

@gmallard
Copy link
Author

Just a couple of notes for now.

The add_certificate method has been added recently. Not sure exactly when, It is in Ruby 2.5.1, but not Ruby 2.3.2.

The gem attempts to support very old Ruby versions, back to and including 1.8.7. There is no intent to change that.

One strategy might be to use a construct like:

    if ctx.respond_to?(:add_certificate)
        # New code here
    else
        # Old code here
    end

This will result in even more ugly code in netio.rb, but is likely the best implementation route.

gmallard added a commit to gmallard/stomp that referenced this issue Jul 18, 2019
@gmallard
Copy link
Author

OK, done. See: cd19c71

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant