Method: HTTPClient::SSLConfig#add_trust_ca_to_store

Defined in:
lib/httpclient/ssl_config.rb

#add_trust_ca_to_store(cert_store, trust_ca_file_or_hashed_dir) ⇒ Object



247
248
249
250
251
252
253
# File 'lib/httpclient/ssl_config.rb', line 247

def add_trust_ca_to_store(cert_store, trust_ca_file_or_hashed_dir)
  if FileTest.directory?(trust_ca_file_or_hashed_dir)
    cert_store.add_path(trust_ca_file_or_hashed_dir)
  else
    cert_store.add_file(trust_ca_file_or_hashed_dir)
  end
end