Documentation
¶
Overview ¶
Package tlstest contains code to help test Tailscale's TLS support without depending on real WebPKI roots or certificates during tests.
Index ¶
Constants ¶
View Source
const ( ProxyServer = Domain("proxy.tstest") // ControlPlane is a domain name for a test control plane server. ControlPlane = Domain("controlplane.tstest") // Derper is a domain name for a test DERP server. Derper = Domain("derp.tstest") )
ProxyServer is a domain name for a hypothetical proxy server.
Variables ¶
This section is empty.
Functions ¶
func TestRootCA ¶
func TestRootCA() []byte
TestRootCA returns a self-signed ECDSA root CA certificate (as PEM) for testing purposes.
Typical use in a test is like:
bakedroots.ResetForTest(t, tlstest.TestRootCA())
Types ¶
type Domain ¶
type Domain string
Domain is a fake domain name used in TLS tests.
They don't have real DNS records. Tests are expected to fake DNS lookups and dials for these domains.
func (Domain) ServerTLSConfig ¶
ServerTLSConfig returns a TLS configuration suitable for a server using the KeyPair's certificate and private key.
Click to show internal directories.
Click to hide internal directories.