encryption

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSelfSignedUseEverywhereX509

func GenerateSelfSignedUseEverywhereX509(commonName string, keyLengthBits int) (*tls.Certificate, error)

GenerateSelfSignedUseEverywhereX509 generates a TLS serverCert that is self-signed

func GenerateSelfSignedX509CA

func GenerateSelfSignedX509CA(commonName string, extUsage []x509.ExtKeyUsage, keyLengthBits int) (*tls.Certificate, error)

GenerateSelfSignedX509CA generates a TLS serverCert that is self-signed

func GenerateServerX509UsingCA

func GenerateServerX509UsingCA(commonName string, ca *tls.Certificate) (*tls.Certificate, *rsa.PrivateKey, error)

GenerateServerX509UsingCA generates a TLS serverCert that is self-signed

Types

type CertProvider

type CertProvider interface {
	FetchServerCertificate() (*tls.Certificate, error)
	FetchClientCAs() (*x509.CertPool, error)
	GetSettings() *config.GroupTLS
}

CertProvider is a common interface to load raw TLS/X509 primitives.

type ClientCertProvider added in v1.5.0

type ClientCertProvider interface {
	FetchClientCertificate(isWorker bool) (*tls.Certificate, error)
	FetchServerRootCAsForClient(isWorker bool) (*x509.CertPool, error)
	ServerName(isWorker bool) string
	DisableHostVerification(isWorker bool) bool
}

ClientCertProvider is an interface to load raw TLS/X509 primitives for configuring clients.

type PerHostCertProviderFactory added in v1.4.0

type PerHostCertProviderFactory interface {
	GetCertProvider(hostName string) (CertProvider, error)
}

PerHostCertProviderFactory creates a CertProvider in the context of a specific Domain.

type TLSConfigProvider

type TLSConfigProvider interface {
	GetInternodeServerConfig() (*tls.Config, error)
	GetInternodeClientConfig() (*tls.Config, error)
	GetFrontendServerConfig() (*tls.Config, error)
	GetFrontendClientConfig() (*tls.Config, error)
}

TLSConfigProvider serves as a common interface to read server and client configuration for TLS.

func NewLocalStoreTlsProvider

func NewLocalStoreTlsProvider(tlsConfig *config.RootTLS) (TLSConfigProvider, error)

func NewTLSConfigProviderFromConfig

func NewTLSConfigProviderFromConfig(encryptionSettings config.RootTLS) (TLSConfigProvider, error)

NewTLSConfigProviderFromConfig creates a new TLS Config provider from RootTLS config

Jump to

Keyboard shortcuts

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