tls

package
v0.0.0-...-c91a6d9 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateCACertificate

func GenerateCACertificate(opts ...Option) (certOut, keyOut []byte, err error)

func GenerateCertificate

func GenerateCertificate(opts ...Option) (certOut, keyOut []byte, err error)

func LoadCertificates

func LoadCertificates(certs ...string) (pool *x509.CertPool, err error)

Types

type Option

type Option func(*Options)

func BitSize

func BitSize(size int) Option

func CACert

func CACert(cert, key []byte) Option

func CACertFromEnv

func CACertFromEnv(certEnvKey, keyEnvKey string) Option

func CACertFromFile

func CACertFromFile(certfile, keyfile string) Option

func CACertFromProvider

func CACertFromProvider(fn func() (cert, key []byte, err error)) Option

func CommonName

func CommonName(commonName string) Option

func Country

func Country(country ...string) Option

func Host

func Host(host ...string) Option

func IsServerCert

func IsServerCert(isServerCert bool) Option

func Locality

func Locality(locality ...string) Option

func Organization

func Organization(org ...string) Option

func OrganizationalUnit

func OrganizationalUnit(orgUnit ...string) Option

func Province

func Province(province ...string) Option

type Options

type Options struct {
	Host []string

	CACert []byte
	CAKey  []byte

	CommonName         string
	Locality, Province []string

	Country, Organization, OrganizationalUnit []string

	BitSize int

	IsServerCert bool
}

Jump to

Keyboard shortcuts

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