Documentation ¶
Overview ¶
Package tlstestutil provides a simple interface for creating TLS CA and leaf certificates for use in tests. This package is not reviewed/maintained for security in any sense.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CA ¶
func CA(t *testing.T, rnd io.Reader) (*x509.Certificate, *x509.CertPool, *ecdsa.PrivateKey)
CA returns a new CA certificate, a pool containing that certificate, and the corresponding private key.
func Cert ¶
func Cert(t *testing.T, caCert *x509.Certificate, caPrivKey *ecdsa.PrivateKey, hostname string, rnd io.Reader) tls.Certificate
Cert generates a new TLS certificate for hostname and signs it using caPrivKey.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.