cert

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CA

type CA interface {
	GetRootCA() *x509.Certificate
	GetCert(commonName string) (*tls.Certificate, error)
}

func NewSelfSignCA

func NewSelfSignCA(path string) (CA, error)

NewSelfSignCA Load ca from store path or create new ca then store.

func NewSelfSignCAMemory

func NewSelfSignCAMemory() (CA, error)

NewSelfSignCAMemory Create new ca only live in memory, will change when process restart.

type SelfSignCA

type SelfSignCA struct {
	rsa.PrivateKey
	RootCert  x509.Certificate
	StorePath string
	// contains filtered or unexported fields
}

func (*SelfSignCA) DummyCert

func (ca *SelfSignCA) DummyCert(commonName string) (*tls.Certificate, error)

TODO: Should we support multiple SubjectAltNames.

func (*SelfSignCA) GetCert

func (ca *SelfSignCA) GetCert(commonName string) (*tls.Certificate, error)

func (*SelfSignCA) GetRootCA

func (ca *SelfSignCA) GetRootCA() *x509.Certificate

Jump to

Keyboard shortcuts

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