Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
func GenerateKeyPair(rootCertCN string, notBefore, notAfter time.Time, hosts ...string) ([]byte, []byte, *ecdsa.PrivateKey, error)
GenerateKeyPair creates root CA, certificate and key with optional hosts. Certificate is valid from notBefore and expires after notAfter.
func MarshalCertToPEMString ¶
MarshalCertToPEMString encodes derBytes to a PEM format suitable for dropping into a route's TLS certificate stanza.
func MarshalPrivateKeyToPEMString ¶
func MarshalPrivateKeyToPEMString(key *ecdsa.PrivateKey) (string, error)
MarshalPrivateKeyToPEMString converts the key to a string representation (PEM form) suitable for dropping into a route's TLS key stanza.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.