certgen

package module
v0.0.0-...-0fb4cb7 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: MIT Imports: 13 Imported by: 0

README

certgen

Some certificate generation utilities

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TlsLeaf

func TlsLeaf(cert *tls.Certificate) *x509.Certificate

Types

type CertGen

type CertGen struct {
	// contains filtered or unexported fields
}

func LoadCertGen

func LoadCertGen(certBytes, keyBytes []byte) (*CertGen, error)

func MakeCaTls

func MakeCaTls(name pkix.Name, serialNumber *big.Int) (*CertGen, error)

func MakeClientTls

func MakeClientTls(ca *CertGen, name pkix.Name, serialNumber *big.Int) (*CertGen, error)

func MakeServerTls

func MakeServerTls(ca *CertGen, name pkix.Name, serialNumber *big.Int, dnsNames []string, ipAddresses []net.IP) (*CertGen, error)

func (*CertGen) GetCertPem

func (ca *CertGen) GetCertPem() []byte

func (*CertGen) GetKeyPem

func (ca *CertGen) GetKeyPem() []byte

func (*CertGen) GetTlsLeaf

func (ca *CertGen) GetTlsLeaf() tls.Certificate

func (*CertGen) SaveFiles

func (ca *CertGen) SaveFiles(caCert, caKey io.Writer) error

Jump to

Keyboard shortcuts

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