certs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertManager

type CertManager interface {
	GetTLSConfig() (*tls.Config, error)
}

CertManager defines the interface for managing TLS configuration

type SelfSignedCertManager

type SelfSignedCertManager struct {
	Host     string
	CertDir  string
	CertPath string
	KeyPath  string
	// contains filtered or unexported fields
}

SelfSignedCertManager handles self-signed certificate generation

func NewSelfSignedCertManager

func NewSelfSignedCertManager(host, certDir string) *SelfSignedCertManager

NewSelfSignedCertManager creates a new manager for self-signed certificates

func (*SelfSignedCertManager) GetCertHash

func (cm *SelfSignedCertManager) GetCertHash() ([]byte, error)

func (*SelfSignedCertManager) GetCertificate

func (cm *SelfSignedCertManager) GetCertificate() (*tls.Certificate, error)

GetCertificate loads or generates a self-signed certificate

func (*SelfSignedCertManager) GetTLSConfig

func (cm *SelfSignedCertManager) GetTLSConfig() (*tls.Config, error)

GetTLSConfig generates or loads a self-signed certificate and returns a tls.Config

Jump to

Keyboard shortcuts

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