cert

package
v0.0.0-...-f2f15b6 Latest Latest
Warning

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

Go to latest
Published: May 23, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCACertificate

func GenerateCACertificate(org, certpath string) (err error)

func GenerateCertificate

func GenerateCertificate(certpath string, tmpl *x509.Certificate, hosts []string) (cert, key *bytes.Buffer, err error)

func LoadCACert

func LoadCACert(certpath string) (cert tls.Certificate, err error)

func NewX509Certificate

func NewX509Certificate(org string) (*x509.Certificate, error)

func WriteCertificate

func WriteCertificate(output string, data []byte) error

func WriteKey

func WriteKey(output string, priv *rsa.PrivateKey) error

Types

type PemBlock

type PemBlock struct {
	Name string
	Buf  *bytes.Buffer
}

func GenerateClientCertificate

func GenerateClientCertificate(certpath, org string) (ca, cert, key *PemBlock, err error)

func GenerateServerCertificate

func GenerateServerCertificate(certpath, org string, hosts []string) (ca, cert, key *PemBlock, err error)

func NewPemBlock

func NewPemBlock(name string, block []byte) *PemBlock

Jump to

Keyboard shortcuts

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