ca

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 24 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 {
	X509   map[string]*x509.Certificate
	TLS    map[string]*tls.Certificate
	CAX509 *x509.Certificate
	CATLS  *tls.Certificate

	Store *store.Store

	sync.Mutex
}

func LoadOrCreate

func LoadOrCreate(names ...string) (*CA, error)

func New

func New() *CA

func (*CA) CreateCA

func (ca *CA) CreateCA() error

func (*CA) CreateCertificateFromRequest

func (ca *CA) CreateCertificateFromRequest(wr io.Writer, c string, r models.Request) error

func (*CA) CreateClientCertificate

func (ca *CA) CreateClientCertificate(uuid string) ([]byte, error)

func (*CA) CreateServerCertificate

func (ca *CA) CreateServerCertificate(name string) error

func (*CA) ExportToDisk

func (ca *CA) ExportToDisk(name string, certBytes []byte, privateKey *rsa.PrivateKey) error

func (*CA) GetCertificates

func (ca *CA) GetCertificates() []store.Certificate

func (*CA) GetNextSerial

func (ca *CA) GetNextSerial() *big.Int

func (*CA) GetServerCertificate

func (ca *CA) GetServerCertificate(helo *tls.ClientHelloInfo) (*tls.Certificate, error)

Dynamic TLS server config.

func (*CA) GetUserCertificate

func (ca *CA) GetUserCertificate(uuid string) ([]byte, error)

func (*CA) Load

func (ca *CA) Load(name string) error

func (*CA) LoadOrCreate

func (ca *CA) LoadOrCreate(name string) error

func (*CA) SetStore

func (ca *CA) SetStore(s *store.Store)

func (*CA) WaitForApproval

func (ca *CA) WaitForApproval(s pkix.Name, c string, r models.Request) chan bool

Jump to

Keyboard shortcuts

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