Class: Savon::HTTPRequest

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

Instance Method Summary collapse

Instance Method Details

#configure_sslObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/nfedobrasil/monkey_patches.rb', line 15

def configure_ssl
  @http_request.auth.ssl.ssl_version = @globals[:ssl_version] if @globals.include? :ssl_version

  ['verify_mode', 'cert_key_file', 'cert_key', 'cert_file', 'cert', 'ca_cert_file', 'ca_cert', 'cert_key_password'].each do |key|
    sym = "ssl_#{key}".to_sym
    @http_request.auth.ssl.send("#{key}=", @globals[sym]) if @globals.include? sym
  end

  if (@globals.include?(:ssl_plcs_file) and @globals.include?(:ssl_plcs_password))
    @http_request.auth.ssl.plcs_file @globals[:ssl_plcs_file], @globals[:ssl_plcs_password]
  end
end