certhelpers

package
v1.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MPL-2.0 Imports: 14 Imported by: 0

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)

Jump to

Keyboard shortcuts

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