tlsprovider

package
v0.2.1-dev Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSelfSigned

func GenerateSelfSigned(opts SelfSignedOptions) (tls.Certificate, error)

Types

type Config

type Config struct {
	CertFile string
	KeyFile  string

	// controls how the fallback self-signed cert is generated
	// when the cert or key aren't provided
	SelfSigned SelfSignedOptions

	// defaults to tls.VersionTLS12 when zero.
	MinVersion uint16
}

func (Config) TLSConfig

func (c Config) TLSConfig() (*tls.Config, error)

func (Config) Validate

func (c Config) Validate() error

type SelfSignedOptions

type SelfSignedOptions struct {
	DNSNames []string
	IPs      []net.IP
	ValidFor time.Duration
}

Jump to

Keyboard shortcuts

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