Class: OAuth::Consumer

Inherits:
Object
  • Object
show all
Defined in:
lib/agree2.rb

Instance Method Summary collapse

Instance Method Details

#create_http_with_ca_file_option(_url = nil) ⇒ Object Also known as: create_http

monkey patch with ca_file option from 0.3.6 to allow us to set the agree2 certs



28
29
30
31
32
33
34
35
36
37
# File 'lib/agree2.rb', line 28

def create_http_with_ca_file_option(_url = nil)
  http_object = create_http_without_ca_file_option(_url)
  if http_object.use_ssl && @options[:ca_file]
    http_object.ca_file = @options[:ca_file]
    http_object.verify_mode = OpenSSL::SSL::VERIFY_PEER
    http_object.verify_depth = 5
  end
          
  http_object
end