class OpenSSL::SSL::SSLContext

def initialize(version = nil)

You can get a list of valid methods with OpenSSL::SSL::SSLContext::METHODS

SSLContext.new("SSLv23_client") => ctx
SSLContext.new(:TLSv1) => ctx
SSLContext.new => ctx
call-seq:
def initialize(version = nil)
  self.options |= OpenSSL::SSL::OP_ALL
  self.ssl_version = version if version
end

def set_params(params={})

used.
cert_store are not set then the system default certificate store is
If the verify_mode is not VERIFY_NONE and ca_file, ca_path and

The keys in +params+ must be assignment methods on SSLContext.
If a Hash +params+ is given, the parameters are overridden with it.

Sets saner defaults optimized for the use with HTTP-like protocols.

ctx.set_params(params = {}) -> params
call-seq:
#
def set_params(params={})
  params = DEFAULT_PARAMS.merge(params)
  params.each{|name, value| self.__send__("#{name}=", value) }
  if self.verify_mode != OpenSSL::SSL::VERIFY_NONE
    unless self.ca_file or self.ca_path or self.cert_store
      self.cert_store = DEFAULT_CERT_STORE
    end
  end
  return params
end