Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertBuilder

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

type CertOpt

type CertOpt func(*CertBuilder) error

func CommonName

func CommonName(cn string) CertOpt

func DNS

func DNS(dns ...string) CertOpt

func IP

func IP(ip ...string) CertOpt

func IsCA

func IsCA(isCA bool) CertOpt

func Parent

func Parent(parent Certificate) CertOpt

func SelfSign

func SelfSign() CertOpt

type Certificate

type Certificate struct {
	PrivKey  KeyWrapper
	Template *x509.Certificate
	TLSCert  tls.Certificate
	RawCert  []byte
	Pem      []byte
	IsCA     bool
}

    //////////////////////////////////////////////////////////////////////////// Certificate ////////////////////////////////////////////////////////////////////////////

    func NewCert

    func NewCert(t *testing.T, opts ...CertOpt) (cert Certificate)

    func (Certificate) CombinedPEM

    func (cert Certificate) CombinedPEM() []byte

    func (Certificate) PrivateKeyPEM

    func (cert Certificate) PrivateKeyPEM() []byte

    type KeyWrapper

    type KeyWrapper struct {
    	PrivKey *rsa.PrivateKey
    	Pem     []byte
    }

      //////////////////////////////////////////////////////////////////////////// Private Key ////////////////////////////////////////////////////////////////////////////

      func NewPrivateKey

      func NewPrivateKey(t *testing.T) (key KeyWrapper)

      Source Files