Documentation ¶
Overview ¶
Package internal holds the logic for generating certificates. Based on https://golang.org/src/crypto/tls/generate_cert.go
Index ¶
- func CreateCertificateAndPrivateKeyPEM(params *Params) ([]byte, []byte, error)
- func CreateCertificateAndPrivateKeyPEMFiles(publicCertificateFilePath string, privateKeyFilePath string, params *Params) error
- func ParseName(subject string) (pkix.Name, error)
- func ReadKeyPair(publicCertFileData []byte, privateKeyFileData []byte) (*x509.Certificate, interface{}, error)
- type Params
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCertificateAndPrivateKeyPEM ¶
CreateCertificateAndPrivateKeyPEM returns randomly generated X.509 Public Certificate and Private Key pair in PEM format as byte arrays.
func CreateCertificateAndPrivateKeyPEMFiles ¶
func CreateCertificateAndPrivateKeyPEMFiles(publicCertificateFilePath string, privateKeyFilePath string, params *Params) error
CreateCertificateAndPrivateKeyPEMFiles writes the generated X.509 Public Certificate and Private Key pair to the file system in PEM format.
func ReadKeyPair ¶
func ReadKeyPair(publicCertFileData []byte, privateKeyFileData []byte) (*x509.Certificate, interface{}, error)
ReadKeyPair takes PEM-encoded public certificate/private key pairs and returns the Go classes for them so they can be used for encryption or signing.
Types ¶
Click to show internal directories.
Click to hide internal directories.