Maintenance Ruby 3.3 gets fixes, but no new features. 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.3.0/ext/openssl/lib/openssl/ssl.rb, line 127
def initialize(version = nil)
self.options |= OpenSSL::SSL::OP_ALL
self.ssl_version = version if version
self.verify_mode = OpenSSL::SSL::VERIFY_NONE
self.verify_hostname = false
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.