Documentation ¶
Overview ¶
Cert automates the generation of certificate and certificate authorities.
Index ¶
- func NewCA(cn string, expiry time.Time) ([]byte, []byte, error)
- func NewCSR(user string, role string) ([]byte, []byte, error)
- func NewCert(caCertPEM, caKeyPEM []byte, expiry time.Time, cn string, ...) ([]byte, []byte, error)
- func SignCSR(csr *x509.CertificateRequest, parent *x509.Certificate, ...) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCSR ¶
NewCSR generates a CSR for CN=user,O=role It returns the CSR and private key in PEM format.
func NewCert ¶
func NewCert(caCertPEM, caKeyPEM []byte, expiry time.Time, cn string, extKeyUsage []x509.ExtKeyUsage) ([]byte, []byte, error)
NewCert generates a certificate/key pair.
func SignCSR ¶
func SignCSR(csr *x509.CertificateRequest, parent *x509.Certificate, privKey *rsa.PrivateKey) ([]byte, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.