certs

package
v0.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2021 License: AGPL-3.0 Imports: 12 Imported by: 11

Documentation

Index

Constants

View Source
const (
	// Default minio configuration directory where below configuration files/directories are stored.
	DefaultConsoleConfigDir = ".console"

	// Directory contains below files/directories for HTTPS configuration.
	CertsDir = "certs"

	// Directory contains all CA certificates other than system defaults for HTTPS.
	CertsCADir = "CAs"

	// Public certificate file for HTTPS.
	PublicCertFile = "public.crt"

	// Private key file for HTTPS.
	PrivateKeyFile = "private.key"
)

Variables

View Source
var (
	// DefaultCertsDir certs directory.
	DefaultCertsDir = &ConfigDir{Path: getDefaultCertsDir()}
	// DefaultCertsCADir CA directory.
	DefaultCertsCADir = &ConfigDir{Path: getDefaultCertsCADir()}
	// GlobalCertsDir points to current certs directory set by user with --certs-dir
	GlobalCertsDir = DefaultCertsDir
	// GlobalCertsCADir points to relative Path to certs directory and is <value-of-certs-dir>/CAs
	GlobalCertsCADir = DefaultCertsCADir
)

Functions

func GetAllCertificatesAndCAs added in v0.4.6

func GetAllCertificatesAndCAs() (*x509.CertPool, []*x509.Certificate, *xcerts.Manager)

func GetTLSConfig

func GetTLSConfig() (x509Certs []*x509.Certificate, manager *xcerts.Manager, err error)

func MkdirAllIgnorePerm

func MkdirAllIgnorePerm(path string) error

MkdirAllIgnorePerm attempts to create all directories, ignores any permission denied errors.

Types

type ConfigDir

type ConfigDir struct {
	Path string
}

ConfigDir - points to a user set directory.

func NewConfigDirFromCtx

func NewConfigDirFromCtx(ctx *cli.Context, option string, getDefaultDir func() string) (*ConfigDir, bool)

func (*ConfigDir) Get

func (dir *ConfigDir) Get() string

Get - returns current directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL