cert

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2023 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 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 added in v1.2.0

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