Method: OmfCommon.load_credentials

Defined in:
lib/omf_common.rb

.load_credentials(opts) ⇒ Object



427
428
429
430
431
432
433
# File 'lib/omf_common.rb', line 427

def self.load_credentials(opts)
  unless opts.nil?
    OmfCommon::Auth::CertificateStore.instance.register_default_certs(File.expand_path(opts[:root_cert_dir]))
    cert_and_priv_key = File.read(File.expand_path(opts[:entity_cert])) << "\n" << File.read(File.expand_path(opts[:entity_key]))
    OmfCommon::Auth::Certificate.create_from_pem(cert_and_priv_key)
  end
end