Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultPath ¶
func DefaultPath() string
DefaultPath returns the default filesystem path for the Certificate Authority directory.
Types ¶
type CA ¶
type CA struct {
// Cert is the parsed X.509 CA certificate.
Cert *x509.Certificate
// Key is the CA's private signing key.
Key crypto.Signer
// CertPEM is the PEM-encoded CA certificate bytes.
CertPEM []byte
// Path is the directory on disk where the CA files are stored.
Path string
// Config holds the options used to create this CA, if available.
Config *domain.CAInitOptions
}
CA represents a loaded Certificate Authority with its certificate, private key, and on-disk path.
func Init ¶
Init creates a new root Certificate Authority at caPath, generating a key pair and self-signed certificate.
func Load ¶
Load reads an existing Certificate Authority from caPath, parsing the certificate and private key.
func Renew ¶
Renew re-issues the root CA certificate at caPath with a new validity period, keeping the existing private key.
func (*CA) Fingerprint ¶
Fingerprint returns the SHA-256 fingerprint of the CA certificate as a colon-separated hex string.
Click to show internal directories.
Click to hide internal directories.