cert

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonFields

type CommonFields struct {
	CommonName string `toml:"common_name"`

	Country          []string `toml:"country"`
	Organization     []string `toml:"organization"`
	OrganizationUnit []string `toml:"organization_unit"`

	Locality []string `toml:"locality"`
	Province []string `toml:"province"`

	StreetAddress []string `toml:"street_address"`
	PostalCode    []string `toml:"postal_code"`
}

CommonFields represents common X.509 certificate fields

func (*CommonFields) ToPKIXName

func (c *CommonFields) ToPKIXName() pkix.Name

type Host

type Host struct {
	Alias     string   `toml:"alias"`
	Addresses []string `toml:"addresses"`
}

Host represents single worker node

func (Host) ToSANs

func (host Host) ToSANs() SubjectAdditionalNames

type Params

type Params struct {
	ValidityPeriod time.Duration
	KeySize        int

	CommonFields
	SubjectAdditionalNames
}

func (*Params) CACertTemplate

func (c *Params) CACertTemplate() *x509.Certificate

func (*Params) CSRTemplate

func (c *Params) CSRTemplate() *x509.CertificateRequest

func (*Params) CertTemplate

func (c *Params) CertTemplate() *x509.Certificate

func (*Params) GenKey

func (c *Params) GenKey() (*rsa.PrivateKey, error)

type SubjectAdditionalNames

type SubjectAdditionalNames struct {
	DNSNames       []string
	EmailAddresses []string
	IPAddresses    []net.IP
	URLs           []*url.URL
}

Jump to

Keyboard shortcuts

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