End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
OpenSSL::SSL::SSLContext.new
SSLContext.new → ctx
SSLContext.new(:TLSv1) → ctx
SSLContext.new("SSLv23") → ctx
ext/openssl/lib/openssl/ssl.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/openssl/lib/openssl/ssl.rb, line 122
def initialize(version = nil)
self.options |= OpenSSL::SSL::OP_ALL
self.ssl_version = version if version
end
Creates a new SSL context.
If an argument is given, ssl_version= is called with the value. Note that this form is deprecated. New applications should use min_version= and max_version= as necessary.