Documentation ¶
Index ¶
- func GenerateCA() (ca *x509.Certificate, cert, key []byte, priv *ecdsa.PrivateKey, err error)
- func GenerateCertificate(ca *x509.Certificate, caPriv *ecdsa.PrivateKey, email string) (cert, key []byte, err error)
- func LoadCertPool(caBytes []byte) (*x509.CertPool, error)
- func LoadCertificate(certBytes []byte) (*tls.Certificate, error)
- func LoadKey(keyBytes []byte) (crypto.PrivateKey, error)
- func LoadKeyAndCertificate(keyBytes []byte, certBytes []byte) (*tls.Certificate, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCA ¶
func GenerateCA() (ca *x509.Certificate, cert, key []byte, priv *ecdsa.PrivateKey, err error)
GenerateCA creates a deterministic certificate authority (for test purposes only)
func GenerateCertificate ¶
func GenerateCertificate(ca *x509.Certificate, caPriv *ecdsa.PrivateKey, email string) (cert, key []byte, err error)
GenerateCertificate creates a certificate
func LoadCertPool ¶
LoadCertPool loads cert pool from ca certificate
func LoadCertificate ¶
func LoadCertificate(certBytes []byte) (*tls.Certificate, error)
LoadCertificate loads cert from bytes
func LoadKey ¶
func LoadKey(keyBytes []byte) (crypto.PrivateKey, error)
LoadKey loads key from bytes
func LoadKeyAndCertificate ¶
func LoadKeyAndCertificate(keyBytes []byte, certBytes []byte) (*tls.Certificate, error)
LoadKeyAndCertificate loads client certificate
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.