Skip to content

End of Life Ruby 3.2 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

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.

See also #add_certificate #ciphers also in 4.1 · 4.0 · 3.4 · 3.3 · 3.1 · 3.0