Documentation
¶
Overview ¶
Package echtest provides helpers for exercising ECH support in tests.
It is imported from _test.go files only, so it never ships in the binary.
Index ¶
- func NewConfigList(t testing.TB) ([]byte, tls.EncryptedClientHelloKey)
- func NewDoHServer(t testing.TB, list []byte) *httptest.Server
- func NewECHServer(t testing.TB) (string, []byte)
- func NewPlainServer(t testing.TB) string
- func NewTLSServer(t testing.TB, cfg *tls.Config) string
- func SelfSignedCert(t testing.TB) tls.Certificate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConfigList ¶
func NewConfigList(t testing.TB) ([]byte, tls.EncryptedClientHelloKey)
NewConfigList returns a serialized ECHConfigList and the matching server key.
func NewDoHServer ¶
NewDoHServer starts a DoH server answering HTTPS RRs with list. A nil list yields an answer without ECH config, so lookups fail with "no ECH config".
func NewECHServer ¶
NewECHServer starts a TLS server that accepts ECH with a fresh config list and returns its address together with the matching ECHConfigList.
func NewPlainServer ¶
NewPlainServer starts a TLS server without ECH support.
func NewTLSServer ¶
NewTLSServer starts a TLS listener and discards everything it receives.
func SelfSignedCert ¶
func SelfSignedCert(t testing.TB) tls.Certificate
SelfSignedCert returns a self-signed certificate valid for 127.0.0.1.
Types ¶
This section is empty.