Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCSR ¶
GenerateCSR creates a new EC P-256 private key and a certificate signing request with the given common name. Both are returned PEM-encoded.
func ParseCertPEM ¶
func ParseCertPEM(pemData []byte) (*x509.Certificate, error)
ParseCertPEM decodes a PEM block and parses the contained x509 certificate.
Types ¶
type CA ¶
type CA struct {
Cert *x509.Certificate
Key crypto.PrivateKey
}
CA holds a certificate authority's certificate and private key, used to sign client certificates for mTLS authentication.
func LoadOrCreateCA ¶
LoadOrCreateCA loads an existing CA from dir, or creates a new one if ca.key and ca.crt do not exist yet.
Click to show internal directories.
Click to hide internal directories.