Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientHello ¶
type ClientHello struct {
TLSRecordVersion uint16 `json:"tls_record_version"` // TLS record version (major, minor)
TLSHandshakeVersion uint16 `json:"tls_handshake_version"` // TLS handshake version (major, minor)
CipherSuites []uint16 `json:"cipher_suites"`
CompressionMethods utils.Uint8Arr `json:"compression_methods"`
Extensions []uint16 `json:"extensions"` // extension IDs in original order
ExtensionsNormalized []uint16 `json:"extensions_normalized"` // sorted extension IDs
ServerName string `json:"server_name"` // server_name(0)
NamedGroupList []uint16 `json:"supported_groups"` // supported_groups(10) a.k.a elliptic_curves
ECPointFormatList utils.Uint8Arr `json:"ec_point_formats"` // ec_point_formats(11)
SignatureSchemeList []uint16 `json:"signature_algorithms"` // signature_algorithms(13)
ALPN []string `json:"alpn"` // alpn(16)
CertCompressAlgo []uint16 `json:"compress_certificate"` // compress_certificate(27)
RecordSizeLimit utils.Uint8Arr `json:"record_size_limit"` // record_size_limit(28)
SupportedVersions []uint16 `json:"supported_versions"` // supported_versions(43)
PSKKeyExchangeModes utils.Uint8Arr `json:"psk_key_exchange_modes"` // psk_key_exchange_modes(45)
ApplicationSettings []string `json:"application_settings"` // application_settings(17513) a.k.a ALPS
NID int64 `json:"nid,omitempty"` // NID of the fingerprint
NormNID int64 `json:"norm_nid,omitempty"` // Normalized NID of the fingerprint
ID string `json:"id,omitempty"` // ID of the fingerprint (hex string)
NormID string `json:"norm_id,omitempty"` // Normalized ID of the fingerprint (hex string)
// contains filtered or unexported fields
}
func ReadClientHello ¶
func ReadClientHello(r io.Reader) (ch *ClientHello, err error)
ReadClientHello reads a ClientHello from a connection (io.Reader) and returns a ClientHello struct.
It will return an error if the reader does not give a stream of bytes representing a valid ClientHello. But all bytes read from the reader will be stored in the ClientHello struct to be rewinded by the caller.
func (*ClientHello) FingerprintID ¶
func (ch *ClientHello) FingerprintID(normalized bool) string
FingerprintID calculates fingerprint ID of ClientHello and represents it as hexadecimal string.
func (*ClientHello) FingerprintNID ¶
func (ch *ClientHello) FingerprintNID(normalized bool) int64
FingerprintNID calculates fingerprint Numerical ID of ClientHello. Fingerprint is defined by
func (*ClientHello) ParseClientHello ¶
func (ch *ClientHello) ParseClientHello() error
ParseClientHello parses the raw bytes of a ClientHello into a ClientHello struct.
func (*ClientHello) Raw ¶
func (ch *ClientHello) Raw() []byte
Click to show internal directories.
Click to hide internal directories.