Documentation ¶
Overview ¶
Package tlstypes is copy of tlstypes package in mtg. Added for faketls obfuscator testing purposes. Original code: https://github.com/9seconds/mtg/tree/7a6695f6c4b9026875195f5fc1b8a2e5fe77bb03/tlstypes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version10Bytes = []byte{0x03, 0x01} Version11Bytes = []byte{0x03, 0x02} Version12Bytes = []byte{0x03, 0x03} Version13Bytes = []byte{0x03, 0x04} CipherSuiteType_TLS_AES_128_GCM_SHA256_Bytes = []byte{0x13, 0x01} // nolint: stylecheck,golint CipherSuiteType_TLS_AES_256_GCM_SHA384_Bytes = []byte{0x13, 0x02} // nolint: stylecheck,golint CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256_Bytes = []byte{0x13, 0x03} // nolint: stylecheck,golint )
Functions ¶
func FromUint24 ¶
Types ¶
type CipherSuiteType ¶
type CipherSuiteType uint8
const ( CipherSuiteType_TLS_AES_128_GCM_SHA256 CipherSuiteType = iota // nolint: stylecheck,golint CipherSuiteType_TLS_AES_256_GCM_SHA384 // nolint: stylecheck,golint CipherSuiteType_TLS_CHACHA20_POLY1305_SHA256 // nolint: stylecheck,golint )
func (CipherSuiteType) Bytes ¶
func (c CipherSuiteType) Bytes() []byte
type ClientHello ¶
type ClientHello struct {
Handshake
}
func ParseClientHello ¶
func ParseClientHello(raw []byte) (*ClientHello, error)
func (ClientHello) Digest ¶
func (c ClientHello) Digest(secret []byte) []byte
type Handshake ¶
type Handshake struct { Type HandshakeType Version Version Random [32]byte SessionID []byte Tail Byter }
func (*Handshake) WriteBytes ¶
type HandshakeType ¶
type HandshakeType uint8
const ( HandshakeTypeClient HandshakeType = 0x01 HandshakeTypeServer HandshakeType = 0x02 )
type Record ¶
type Record struct { Type RecordType Version Version Data Byter }
func MakeRecords ¶
func (Record) WriteBytes ¶
type RecordType ¶
type RecordType uint8
const ( RecordTypeHandshake RecordType = 0x16 RecordTypeApplicationData RecordType = 0x17 RecordTypeChangeCipherSpec RecordType = 0x14 )
type ServerHello ¶
type ServerHello struct { Handshake // contains filtered or unexported fields }
func NewServerHello ¶
func NewServerHello(clientHello *ClientHello) *ServerHello
func (ServerHello) WelcomePacket ¶
func (s ServerHello) WelcomePacket(secret []byte) []byte
Click to show internal directories.
Click to hide internal directories.