Documentation
¶
Index ¶
- Constants
- func LoadFromDisk(pkiPath, name string) (*x509.Certificate, crypto.Signer, error)
- func NewKey(algorithm string, bits int) (crypto.Signer, error)
- func NewSelfSignedCACert(cfg *Config, key crypto.Signer) (*x509.Certificate, error)
- func ParseDuration(s string) (time.Duration, error)
- func WriteToDisk(pkiPath, name string, certs []*x509.Certificate, key crypto.Signer) error
- type Config
Constants ¶
View Source
const ( KeyExt = ".key" CertExt = ".crt" )
Variables ¶
This section is empty.
Functions ¶
func LoadFromDisk ¶
func NewSelfSignedCACert ¶
NewSelfSignedCACert creates a self-signed CA certificate respecting the validity duration configured in cfg. If cfg.ValidFor is zero, a default of one year is used.
func ParseDuration ¶
ParseDuration converts a human-friendly duration string into a time.Duration. It supports the suffixes "y" for years (365 days) and "d" for days in addition to the standard time.ParseDuration formats like "720h" or "15m".
func WriteToDisk ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.