clienthello

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package clienthello parses DTLS ClientHello framing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateExtensions

func ValidateExtensions(extensions []extension.Raw, requirePSKLast bool) error

ValidateExtensions rejects duplicate types and optionally requires pre_shared_key to be last. Encoded ECH inners defer ordering until expansion.

Types

type Wire

type Wire struct {
	// Prefix contains everything before the extensions vector.
	Prefix       []byte
	SessionID    []byte
	Cookie       []byte
	CipherSuites []uint16
	// Compression includes its length prefix for the protocol decoder.
	Compression []byte
	Extensions  []extension.Raw
	Trailing    []byte
}

Wire retains the original ClientHello fields. Byte slices reference the input; extension payloads are owned copies, as returned by extension.ParseList.

func Parse

func Parse(data []byte) (Wire, error)

Parse parses one ClientHello body without record or handshake headers. It leaves trailing bytes are handled by the caller because ECH interprets them as inner-hello padding.

Jump to

Keyboard shortcuts

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