Documentation ¶
Overview ¶
Package authority provides an in-process TLS certificate authority, useful for creating and distributing TLS certificates for mutually authenticated HTTPS networking within Bigmachine.
Index ¶
Constants ¶
const DriftMargin = time.Minute
DriftMargin is the amount of acceptable clock drift during certificate issuing and verification.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type T ¶
type T struct {
// contains filtered or unexported fields
}
A T is a TLS certificate authority which can issue client and server
certificates and provide configuration for HTTPS clients.
func New ¶
New creates a new certificate authority, reading the PEM-encoded certificate and private key from the provided path. If the path does not exist, newCA instead creates a new certificate authority and stores it at the provided path. If path is empty, the authority is ephemeral.
func (*T) Cert ¶
func (c *T) Cert() *x509.Certificate
Cert returns the authority's x509 certificate.
func (*T) HTTPSConfig ¶
HTTPSConfig returns a tls configs based on newly issued TLS certificates from this CA.