echtest

package
v0.28.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

func NewDoHServer(t testing.TB, list []byte) *httptest.Server

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

func NewECHServer(t testing.TB) (string, []byte)

NewECHServer starts a TLS server that accepts ECH with a fresh config list and returns its address together with the matching ECHConfigList.

func NewPlainServer

func NewPlainServer(t testing.TB) string

NewPlainServer starts a TLS server without ECH support.

func NewTLSServer

func NewTLSServer(t testing.TB, cfg *tls.Config) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL