Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCertDir ¶
func DefaultCertDir() string
DefaultCertDir returns the default directory for auto-generated TLS certs.
func EnsureCert ¶
func EnsureCert(certPath, keyPath string) (tls.Certificate, error)
EnsureCert generates a self-signed TLS certificate pair if they don't already exist at certPath/keyPath. If both files exist, it loads and returns them. If neither exists, it creates a new RSA 2048-bit key and self-signed cert valid for 365 days, then writes them to disk.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.