handshake

package
v0.0.0-...-6e8ee2e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package handshake contains adaptations of the builtin golang TLS implementation to read part of the handshake.

Portions of this package are adapted from the go standard library so we reproduce the license below.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientHelloMsg

type ClientHelloMsg struct {
	Vers               uint16
	Random             []byte
	SessionID          []byte
	CipherSuites       []uint16
	CompressionMethods []uint8
	ServerName         string
}

ClientHelloMsg represents the ClientHello portion of the TLS handshake. Adapted from https://github.com/golang/go/blob/074f2761b5ff54c9c9d2e2a720abd29efa5474cc/src/crypto/tls/handshake_messages.go#L71

func PeekClientHello

func PeekClientHello(c net.Conn) (net.Conn, *ClientHelloMsg, error)

PeekClientHello reads the ClientHello TLS handshake record and returns it as well as a Conn without it read.

Jump to

Keyboard shortcuts

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