Documentation ¶
Index ¶
- func Decode(block []byte, typ string) ([][]byte, error)
- func GenerateCertificate(keyPEMBlock []byte, template *x509.Certificate) (*tls.Certificate, error)
- func ParsePrivateKey(der []byte) (crypto.PrivateKey, error)
- func ParsePublicKey(priv interface{}) interface{}
- func X509(pair *KeyPair) (tls.Certificate, error)
- func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (tls.Certificate, error)
- type KeyPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCertificate ¶
func GenerateCertificate(keyPEMBlock []byte, template *x509.Certificate) (*tls.Certificate, error)
func ParsePrivateKey ¶
func ParsePrivateKey(der []byte) (crypto.PrivateKey, error)
ParsePrivateKey attempts to parse the given private key DER block. OpenSSL 0.9.8 generates PKCS#1 private keys by default, while OpenSSL 1.0.0 generates PKCS#8 keys. OpenSSL ecparam generates SEC1 EC private keys for ECDSA. We try all three.
func ParsePublicKey ¶
func ParsePublicKey(priv interface{}) interface{}
func X509KeyPair ¶
func X509KeyPair(certPEMBlock, keyPEMBlock []byte) (tls.Certificate, error)
Types ¶
Click to show internal directories.
Click to hide internal directories.