certsgen

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertTemplate

func CertTemplate(notBefore, notAfter time.Time, opts ...templateOption) (*x509.Certificate, error)

CertTemplate is a helper function to create a cert template with a serial number and other required fields

func CreateCert

func CreateCert(template, parent *x509.Certificate, pub interface{}, parentPriv interface{}) (
	cert *x509.Certificate, certPEM []byte, err error)

CreateCert invokes x509.CreateCertificate and returns it in the x509.Certificate format

func NewTLSCredentials

func NewTLSCredentials(notBefore, notAfter time.Time, opts ...templateOption) ([]byte, []byte, []byte, []byte, []byte)

NewTLSCredentials creates signed certificates for both the client and server output in order: ca, client.cert, client.key, server.cert, server.key

func WithAliasDNSNames

func WithAliasDNSNames(aliasDNSNames ...string) aliasDNSNamesOption

func WithAliasIPs

func WithAliasIPs(aliasIPs ...string) aliasIPsOption

func WithOrganizations

func WithOrganizations(organizations ...string) organizationOption

Types

type Option

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

Jump to

Keyboard shortcuts

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