Class: HTTParty::ConnectionAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/occi/api/client/http/monkey_patches/httparty_fix.rb

Instance Method Summary collapse

Instance Method Details

#attach_ssl_certificates(http, options) ⇒ Object (private)


12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/occi/api/client/http/monkey_patches/httparty_fix.rb', line 12

def attach_ssl_certificates(http, options)
  old_attach_ssl_certificates(http, options)

  # Set chain of client certificates
  if options[:ssl_extra_chain_cert]
    http.extra_chain_cert = []

    options[:ssl_extra_chain_cert].each do |p_ca|
      http.extra_chain_cert << OpenSSL::X509::Certificate.new(p_ca)
    end
  end
end

#old_attach_ssl_certificatesObject (private)


10
# File 'lib/occi/api/client/http/monkey_patches/httparty_fix.rb', line 10

alias_method :old_attach_ssl_certificates, :attach_ssl_certificates