Skip to content

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

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.2 · 3.1 · 3.0