must

package
v0.0.0-...-d356cf7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertPool

func CertPool(certs ...*tls.Certificate) *x509.CertPool

CertPool is a set of x509 certificates.

Types

type Cert

type Cert tls.Certificate

Cert is an alias for tls.Certificate with extra helper methods.

func CACert

func CACert(hostname string, parent *Cert) *Cert

CACert generates a new certificate that can sign leaf & intermediary certificates. The certificate is self-signed if parent is nil.

func LeafCert

func LeafCert(hostname string, parent *Cert) *Cert

LeafCert generates a new leaf certificate. The certificate is self-signed if parent is nil.

func (*Cert) CertMap

func (c *Cert) CertMap() map[string]string

CertMap is a map holding the PEM encoded cert & key.

func (*Cert) CertPEM

func (c *Cert) CertPEM() string

CertPEM is the PEM encoded x509 certificate data.

func (*Cert) KeyPEM

func (c *Cert) KeyPEM() string

KeyPEM is the PEM encoded private key data.

func (*Cert) Sign

func (c *Cert) Sign(child *Cert) *Cert

Sign returns a new Cert with an additional signature signed by c.

func (*Cert) TLS

func (c *Cert) TLS() *tls.Certificate

TLS returns c as a *tls.Certificate.

Jump to

Keyboard shortcuts

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