cert

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2015 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BootstrapCertificates

func BootstrapCertificates(authOptions *auth.Options) error

func GenerateCACertificate

func GenerateCACertificate(certFile, keyFile, org string, bits int) error

func GenerateCert

func GenerateCert(hosts []string, certFile, keyFile, caFile, caKeyFile, org string, bits int) error

func ReadTLSConfig added in v0.5.3

func ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error)

func SetCertGenerator

func SetCertGenerator(cg Generator)

func ValidateCertificate

func ValidateCertificate(addr string, authOptions *auth.Options) (bool, error)

Types

type Generator added in v0.5.1

type Generator interface {
	GenerateCACertificate(certFile, keyFile, org string, bits int) error
	GenerateCert(hosts []string, certFile, keyFile, caFile, caKeyFile, org string, bits int) error
	ReadTLSConfig(addr string, authOptions *auth.Options) (*tls.Config, error)
	ValidateCertificate(addr string, authOptions *auth.Options) (bool, error)
}

func NewX509CertGenerator

func NewX509CertGenerator() Generator

type PathInfo added in v0.5.1

type PathInfo struct {
	CaCertPath       string
	CaPrivateKeyPath string
	ClientCertPath   string
	ClientKeyPath    string
	ServerCertPath   string
	ServerKeyPath    string
}

type X509CertGenerator

type X509CertGenerator struct{}

func (*X509CertGenerator) GenerateCACertificate

func (xcg *X509CertGenerator) GenerateCACertificate(certFile, keyFile, org