Documentation ¶
Index ¶
- func GeneratePrivateKey() ([]byte, error)
- func NewCertificateRequest(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error)
- func ParseCertificateRequestObject(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error)
- func ParsePrivateKey(keyData []byte) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePrivateKey ¶
GeneratePrivateKey returns PEM data containing a generated ECDSA private key
func NewCertificateRequest ¶
func NewCertificateRequest(privateKey interface{}, subject *pkix.Name, dnsSANs []string, ipSANs []net.IP) (csr []byte, err error)
NewCertificateRequest generates a PEM-encoded CSR using the supplied private key, subject, and SANs. privateKey must be a *ecdsa.PrivateKey or *rsa.PrivateKey.
func ParseCertificateRequestObject ¶
func ParseCertificateRequestObject(obj *certificates.CertificateSigningRequest) (*x509.CertificateRequest, error)
ParseCertificateRequestObject extracts the CSR from the API object and decodes it.
func ParsePrivateKey ¶
ParsePrivateKey returns a private key parsed from a PEM block in the supplied data. Recognizes PEM blocks for "EC PRIVATE KEY" and "RSA PRIVATE KEY"
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.