Method: Kontena::Cli::Config::Server#ssl_cert_path

Defined in:
lib/kontena/cli/config.rb

#ssl_cert_pathString?

Returns path to ~/.kontena/certs/*.pem.

Returns:

  • (String, nil)

    path to ~/.kontena/certs/*.pem



583
584
585
586
587
588
589
590
591
# File 'lib/kontena/cli/config.rb', line 583

def ssl_cert_path
  path = File.join(Dir.home, '.kontena', 'certs', "#{self.uri.host}.pem")

  if File.exist?(path) && File.readable?(path)
    return path
  else
    return nil
  end
end