cert

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 20 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 struct {
	rsa.PrivateKey
	RootCert  x509.Certificate
	StorePath string
	// contains filtered or unexported fields
}

func NewCA

func NewCA(path string) (*CA, error)

Load ca from store path or create new ca then store

func NewCAMemory

func NewCAMemory() (*CA, error)

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

func (*CA) DummyCert

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

TODO: 是否应该支持多个 SubjectAltName

func (*CA) GetCert

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

Jump to

Keyboard shortcuts

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