websecure

package
v0.0.0-...-62b8dee Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertStore

type CertStore struct {
	// contains filtered or unexported fields
}

func NewCertStore

func NewCertStore(storePath string, log *zerolog.Logger) *CertStore

func (*CertStore) GetCertificate

func (s *CertStore) GetCertificate(hostname string) *tls.Certificate

GetCertificate returns the certificate for the given hostname returns nil if the certificate is not found

func (*CertStore) LoadCertificates

func (s *CertStore) LoadCertificates()

func (*CertStore) ValidateAndSaveCertificate

func (s *CertStore) ValidateAndSaveCertificate(hostname string, cert string, key string, ignoreWarning bool) (error, error)

ValidateAndSaveCertificate validates the certificate and saves it to the store returns are: - error: if the certificate is invalid or if there's any error during saving the certificate - error: if there's any warning or error during saving the certificate

type SelfSigner

type SelfSigner struct {
	DefaultDomain string
	DefaultOrg    string
	DefaultOU     string
	// contains filtered or unexported fields
}

func NewSelfSigner

func NewSelfSigner(
	store *CertStore,
	log *zerolog.Logger,
	defaultDomain,
	defaultOrg,
	defaultOU,
	caName string,
) *SelfSigner

func (*SelfSigner) GetCertificate

func (s *SelfSigner) GetCertificate(info *tls.ClientHelloInfo) (*tls.Certificate, error)

GetCertificate returns the certificate for the given hostname returns nil if the certificate is not found

Jump to

Keyboard shortcuts

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