Versions in this module Expand all Collapse all v0 v0.1.0 Oct 18, 2019 Changes in this version + func AssertCertificateValid(t *testing.T, domain string, issuerCerts, certificate []byte) + func AssertKeyBelongsToCertificate(t *testing.T, kt KeyType, certificate, key []byte) + func CreateOpenSSLPrivateKey(t *testing.T, kt KeyType, keyPath string, pemEncode bool) + func CreateOpenSSLSelfSignedCertificate(t *testing.T, commonName, keyFile, certFile string, pemEncode bool) + func CreateSelfSignedCertificate(t *testing.T, cn string, pk crypto.PrivateKey) *x509.Certificate + func KeyMust(key crypto.PrivateKey, err error) crypto.PrivateKey + func NewPrivateKey(kt KeyType) (crypto.PrivateKey, error) + func ParseCertificate(certificate []byte, pemDecode bool) (*x509.Certificate, error) + func ReadCertificate(r io.Reader, pemDecode bool) (*x509.Certificate, error) + func ReadCertificateFromFile(path string, pemDecode bool) (*x509.Certificate, error) + func ReadPrivateKey(kt KeyType, r io.Reader, pemDecode bool) (crypto.PrivateKey, error) + func ReadPrivateKeyFromFile(kt KeyType, path string, pemDecode bool) (crypto.PrivateKey, error) + func WriteCertificate(cert *x509.Certificate, w io.Writer, pemEncode bool) error + func WriteCertificateForTesting(t *testing.T, certFile string, cn string, pk crypto.PrivateKey, pemEncode bool) *x509.Certificate + func WriteCertificateToFile(cert *x509.Certificate, path string, pemEncode bool) error + func WritePrivateKey(key crypto.PrivateKey, w io.Writer, pemEncode bool) error + func WritePrivateKeyForTesting(t *testing.T, keyFile string, kt KeyType, pemEncode bool) crypto.PrivateKey + func WritePrivateKeyToFile(key crypto.PrivateKey, path string, pemEncode bool) error + type KeyType int + const EC256 + const EC384 + const RSA2048 + const RSA4096 + const RSA8192 + func DetermineKeyType(key crypto.PrivateKey) (KeyType, error)