Documentation
¶
Overview ¶
Package pki is the controller's internal certificate authority (§6.1, §14). It issues the agent gateway's server certificate and signs agents' client certificates from CSRs, so node private keys never leave the node.
Index ¶
Constants ¶
const ( // NodeCertValidity bounds how long a stolen node key is useful; agents renew before expiry. NodeCertValidity = 90 * 24 * time.Hour )
Variables ¶
This section is empty.
Functions ¶
func MarshalKeyPEM ¶
func MarshalKeyPEM(key *ecdsa.PrivateKey) ([]byte, error)
func NewNodeKey ¶
NewNodeKey generates a node key pair and a CSR for it (agent side).
func ParseCertPEM ¶
func ParseCertPEM(b []byte) (*x509.Certificate, error)
Types ¶
type CA ¶
type CA struct {
Cert *x509.Certificate
CertPEM []byte
// contains filtered or unexported fields
}
func LoadOrCreateCA ¶
LoadOrCreateCA loads <dir>/ca.crt and ca.key, creating them on first start.
func (*CA) ServerCert ¶
ServerCert issues a TLS server certificate for the given DNS names and IPs.