Documentation ¶
Overview ¶
Package tls implements TLS infrastructure providers.
Index ¶
- type Authority
- func (ca *Authority) Certificate() *x509.Certificate
- func (ca *Authority) Flags(flags *flag.FlagSet)
- func (ca *Authority) HTTPS() (client, server *cryptotls.Config, err error)
- func (Authority) Help() string
- func (ca *Authority) Init() error
- func (ca *Authority) InstanceConfig() interface{}
- func (ca *Authority) Issue(cn string, ttl time.Duration, ips []net.IP, dnss []string) ([]byte, *rsa.PrivateKey, error)
- type Certs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authority ¶
type Authority struct {
// contains filtered or unexported fields
}
Authority is an infrastructure provider that implements a TLS authority, capable of issuing TLS certificates. Its implementation requires that a file be specified (through the flag parameter file) where the authority is stored. An Authority's instance may also be marshaled, in which case the certificate material for the authority is inlined directly in the instance configuration.
func (*Authority) Certificate ¶
func (ca *Authority) Certificate() *x509.Certificate
Certificate returns the authority's public certificate, which can be used to verify certificates issued by the same.
func (*Authority) HTTPS ¶
HTTPS returns a tls configs based on newly issued TLS certificates from this CA.
func (*Authority) Init ¶
Init implements infra.Provider. It initializes the authority from either the provided file or the serialized instance configuration.
func (*Authority) InstanceConfig ¶
func (ca *Authority) InstanceConfig() interface{}
InstanceConfig implements infra.Provider, allowing for the authority's certificate material to be marshaled inline.