tls

package
v0.0.0-...-407d013 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package tls contains definitions and methods related to tags parsed from the TLS handshake

Index

Constants

View Source
const (
	TagTLSVersion       = "tls.version:"
	TagTLSCipherSuiteID = "tls.cipher_suite_id:"
	TagTLSClientVersion = "tls.client_version:"
)

Constants for tag keys

View Source
const (
	OfferedTLSVersion10 uint8 = 0x01
	OfferedTLSVersion11 uint8 = 0x02
	OfferedTLSVersion12 uint8 = 0x04
	OfferedTLSVersion13 uint8 = 0x08
)

Bitmask constants for Offered_versions matching kernelspace definitions

Variables

ClientVersionTags maps TLS versions to tag names for client offered versions (exported for testing)

View Source
var VersionTags = map[uint16]string{
	tls.VersionTLS10: TagTLSVersion + version10,
	tls.VersionTLS11: TagTLSVersion + version11,
	tls.VersionTLS12: TagTLSVersion + version12,
	tls.VersionTLS13: TagTLSVersion + version13,
}

VersionTags maps TLS versions to tag names for server chosen version (exported for testing)

Functions

This section is empty.

Types

type Tags

type Tags struct {
	ChosenVersion   uint16
	CipherSuite     uint16
	OfferedVersions uint8
}

Tags holds the TLS tags. It is used to store the TLS version, cipher suite and offered versions. We can't use the struct from eBPF as the definition is shared with windows.

func (*Tags) GetDynamicTags

func (t *Tags) GetDynamicTags() map[string]struct{}

GetDynamicTags generates dynamic tags based on TLS information

func (*Tags) IsEmpty

func (t *Tags) IsEmpty() bool

IsEmpty returns true if all fields are zero

func (*Tags) MergeWith

func (t *Tags) MergeWith(that Tags)

MergeWith merges the tags from another Tags struct into this one

func (*Tags) String

func (t *Tags) String() string

String returns a string representation of the Tags struct

Directories

Path Synopsis
gotls
testutil
Package testutil provides utilities for testing the TLS package.
Package testutil provides utilities for testing the TLS package.
testutil/gotls_client
Package main is a simple client for the gotls_server.
Package main is a simple client for the gotls_server.
testutil/gotls_server
Package main is a simple client for the gotls_server.
Package main is a simple client for the gotls_server.

Jump to

Keyboard shortcuts

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