cert

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintPeerCertificates

func PrintPeerCertificates(conn net.Conn)

Types

type ClientConfig

type ClientConfig struct {
	Config
	InsecureSkipVerify bool `json:"insecure" short:"k" long:"insecure"  env:"INSECURE" description:"Allows insecure connections"`
}

ClientConfig is the certificate configuration with client-specific extensions

func (*ClientConfig) GetTlsConfig

func (m *ClientConfig) GetTlsConfig() (conf *tls.Config, err error)

type Config

type Config struct {
	CaCertificate             string  `json:"caCertificate" long:"ca-certificate" env:"CA_CERTIFICATE" description:"CA certificate(s)"`
	CaCertificateFile         string  `json:"caCertificateFile" long:"ca-certificate-file" env:"CA_CERTIFICATE_FILE" description:"File with CA certificate(s)"`
	Certificate               string  `json:"certificate" long:"certificate" env:"CERTIFICATE" description:"Authentication certificate"`
	CertificateFile           string  `json:"certificateFile" long:"certificate-file" env:"CERTIFICATE_FILE" description:"Authentication certificate"`
	PrivateKey                string  `json:"privateKey" long:"private-key" env:"PRIVATE_KEY" description:"Authentication private key"`
	PrivateKeyFile            string  `json:"privateKeyFile" long:"private-key-file" env:"PRIVATE_KEY_FILE" description:"Authentication private key"`
	PrivateKeyPassword        *string `json:"privateKeyPassword" long:"private-key-password" env:"PRIVATE_KEY_PASSWORD" description:"Decryption password"`
	PrivateKeyPasswordProgram string  `` /* 158-byte string literal not displayed */
}

Config is the generic certificate configuration

func (*Config) GetCaCertificates

func (m *Config) GetCaCertificates() ([]byte, error)

func (*Config) GetCertificate

func (m *Config) GetCertificate() ([]byte, error)

func (*Config) GetPrivateKey

func (m *Config) GetPrivateKey() (privateKeyPemBlock []byte, err error)

func (*Config) GetPrivateKeyPassword

func (m *Config) GetPrivateKeyPassword() ([]byte, error)

func (*Config) GetTlsConfig

func (m *Config) GetTlsConfig() (*tls.Config, error)

func (*Config) GetX509KeyPair

func (m *Config) GetX509KeyPair() (*tls.Certificate, error)

type ConfigGetter

type ConfigGetter interface {
	CertManager() TlsConfig
}

type ServerConfig

type ServerConfig struct {
	Config
	RequireClientCert bool `` /* 150-byte string literal not displayed */
}

ServerConfig is the certificate configuration with server-specific extensions

func (*ServerConfig) GetTlsConfig

func (m *ServerConfig) GetTlsConfig() (conf *tls.Config, err error)

type TlsConfig

type TlsConfig interface {
	GetTlsConfig() (*tls.Config, error)
}

Jump to

Keyboard shortcuts

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