cert

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 20 Imported by: 2

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 added in v1.8.2

func NewSelfSignCA(path string) (CA, error)

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

func NewSelfSignCAMemory added in v1.8.2

func NewSelfSignCAMemory() (CA, error)

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

type SelfSignCA added in v1.8.2

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

func (*SelfSignCA) DummyCert added in v1.8.2

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

TODO: 是否应该支持多个 SubjectAltName

func (*SelfSignCA) GetCert added in v1.8.2

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

func (*SelfSignCA) GetRootCA added in v1.8.2

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

Jump to

Keyboard shortcuts

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