Method: HTTPX::SSL#initialize

Defined in:
lib/httpx/io/ssl.rb

#initialize(_, _, options) ⇒ SSL

Returns a new instance of SSL.



13
14
15
16
17
18
19
# File 'lib/httpx/io/ssl.rb', line 13

def initialize(_, _, options)
  @ctx = OpenSSL::SSL::SSLContext.new
  ctx_options = TLS_OPTIONS.merge(options.ssl)
  @ctx.set_params(ctx_options) unless ctx_options.empty?
  super
  @state = :negotiated if @keep_open
end