certificates

package
v0.0.0-...-c5919bc Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBaseCertTemplate

func GetBaseCertTemplate(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
) (*x509.Certificate, error)

func GetCertAndKey

func GetCertAndKey(
	template *x509.Certificate,
	signeeKey *rsa.PrivateKey,
	parent *x509.Certificate,
	signingKey *rsa.PrivateKey,
) (string, string, error)

func PemBlockForKey

func PemBlockForKey(priv interface{}) *pem.Block

Types

type Certificate

type Certificate struct {
	Cert string
	Key  string
}

func BuildCustomCertificate

func BuildCustomCertificate(b64cert string, b64key string) (*Certificate, error)

func GenerateCertificateAuthority

func GenerateCertificateAuthority(
	cn string,
	daysValid int,
) (*Certificate, error)

func GenerateSelfSignedCertificate

func GenerateSelfSignedCertificate(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
) (Certificate, error)

func GenerateSignedCertificate

func GenerateSignedCertificate(
	cn string,
	ips []interface{},
	alternateDNS []interface{},
	daysValid int,
	ca Certificate,
) (Certificate, error)

Jump to

Keyboard shortcuts

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