certificate

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFileRefreshInterval time.Duration = 5 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type ACMECertificateProvider

type ACMECertificateProvider struct {
	AutoCertManager       autocert.Manager
	EnableHttp01Challenge bool
	Http01ChallengePort   int
	// contains filtered or unexported fields
}

ACMECertificateProvider implements an ACME based certificate provider creating certificates on-access via an ACME provider like LetsLet's Encrypt.

func (*ACMECertificateProvider) Close

func (p *ACMECertificateProvider) Close() error

func (*ACMECertificateProvider) TLSConfig

func (p *ACMECertificateProvider) TLSConfig(server *httpserver.Instance) (*tls.Config, error)

type FileCertificateProvider

type FileCertificateProvider struct {
	// CertFile defines the certificate file to load. Certificate data must be PEM encoded.
	CertFile string
	// KeyFile defines the key file to load. Key data must be PEM encoded.
	KeyFile string
	// RefreshInterval defines the interval after which the files are reexamined
	// and are automatically reloaded in case of an update. The default value of 0
	// disables the reload.
	RefreshInterval time.Duration
	// contains filtered or unexported fields
}

FileCertificateProvider implements a file based certificate provider loading the certificate from the given files using tls.LoadX509KeyPair.

func (*FileCertificateProvider) Close

func (p *FileCertificateProvider) Close() error

func (*FileCertificateProvider) TLSConfig

type SimpleCertificateProvider

type SimpleCertificateProvider struct {
	// Certificates is set to the certificates to be set in the
	// [tls.Config] returned by [httpserver.CertificateProvider.TLSConfig].
	Certificates []tls.Certificate
}

SimpleCertificateProvider is a certificate provider simply providing the statically given certificates.

func (*SimpleCertificateProvider) Close

func (p *SimpleCertificateProvider) Close() error

func (*SimpleCertificateProvider) TLSConfig

Jump to

Keyboard shortcuts

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