ca

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authority

type Authority struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Authority represents a root certificate authority that can issues certificates to be used for Client certs. Sonobuoy issues every worker a client certificate

func NewAuthority

func NewAuthority() (*Authority, error)

NewAuthority creates a new certificate authority. A new private key and root certificate will be generated but not returned.

func (*Authority) CACert

func (a *Authority) CACert() *x509.Certificate

CACert is the root certificate of the CA.

func (*Authority) CACertPool

func (a *Authority) CACertPool() *x509.CertPool

CACertPool returns a CertPool prepopulated with the authority's certificate

func (*Authority) ClientKeyPair

func (a *Authority) ClientKeyPair(name string) (*tls.Certificate, error)

ClientKeyPair makes a client cert signed by our root CA. The returned certificate has a chain including the root CA

func (*Authority) MakeServerConfig

func (a *Authority) MakeServerConfig(name string) (*tls.Config, error)

MakeServerConfig makes a new server certificate, then returns a TLS config that uses it and will verify peer certificates

func (*Authority) ServerKeyPair

func (a *Authority) ServerKeyPair(name string) (*tls.Certificate, error)

ServerKeyPair makes a TLS server cert signed by our root CA. The returned certificate has a chain including the root CA cert.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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