encryption

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 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)
	FetchServerRootCAsForClient() (*x509.CertPool, error)
	GetSettings() *config.GroupTLS
}

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

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