certificates

package
v1.4.2-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePrivateKey

func GeneratePrivateKey() ([]byte, error)

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

func ParsePrivateKey(keyData []byte) (interface{}, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL