Documentation
¶
Index ¶
- Constants
- Variables
- type CertComprAlgo
- type CertComprAlgoInfo
- type CipherSuite
- type CipherSuiteInfo
- type ClientHelloMsg
- func (m *ClientHelloMsg) AddCertComprAlgoInfo()
- func (m *ClientHelloMsg) AddCipherSuiteInfo()
- func (m *ClientHelloMsg) AddCompressionMethodInfo()
- func (m *ClientHelloMsg) AddECPointFormatInfo()
- func (m *ClientHelloMsg) AddInfo()
- func (m *ClientHelloMsg) AddNamedGroupInfo()
- func (m *ClientHelloMsg) AddPSKModeInfo()
- func (m *ClientHelloMsg) AddSignatureSchemeInfo()
- func (m *ClientHelloMsg) AddTLSVersionInfo()
- func (m *ClientHelloMsg) GetCertComprAlgos() []CertComprAlgo
- func (m *ClientHelloMsg) GetSignatureSchemes() []SignatureScheme
- func (m *ClientHelloMsg) GetSupportedGroups() []NamedGroup
- func (m *ClientHelloMsg) GetSupportedPointFormats() []ECPointFormat
- func (m *ClientHelloMsg) GetSupportedVersions() []TLSVersion
- func (m *ClientHelloMsg) Unmarshal(data []byte) bool
- type CompressionMethod
- type CompressionMethodInfo
- type ECPointFormat
- type ECPointFormatInfo
- type Extension
- type ExtensionData
- type KeyShare
- type NamedGroup
- type NamedGroupInfo
- type PSKIdentity
- type PSKMode
- type PSKModeInfo
- type SignatureScheme
- type SignatureSchemeInfo
- type TLSVersion
- type TLSVersionInfo
Constants ¶
View Source
const (
SCSVRenegotiation uint16 = 0x00ff
)
TLS signaling cipher suite values
Variables ¶
View Source
var CertComprAlgoList = map[uint16]CertComprAlgoInfo{
1: {Code: 1, Name: "zlib"},
2: {Code: 2, Name: "brotli"},
3: {Code: 3, Name: "zstd"},
}
RFC 8879, Section 3 https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#tls-certificate-compression-algorithm-ids
View Source
var CipherSuiteList = parseCipherSuitesCSV()
View Source
var CompressionMethodList = map[uint8]CompressionMethodInfo{
0: {Code: 0, Name: "null"},
1: {Code: 1, Name: "DEFLATE"},
}
https://www.rfc-editor.org/rfc/rfc3749#section-2
View Source
var ECPointFormatList = map[uint8]ECPointFormatInfo{
0: {Code: 0, Name: "uncompressed", Reference: "[RFC8422]"},
1: {Code: 1, Name: "ansiX962_compressed_prime", Reference: "[RFC8422]"},
2: {Code: 2, Name: "ansiX962_compressed_char2", Reference: "[RFC8422]"},
}
https://www.iana.org/assignments/tls-parameters/tls-parameters.xml#tls-parameters-9
View Source
var ExtensionList = parseExtensionsCSV()
View Source
var NamedGroupList = parseNamedGroupsCSV()
View Source
var PSKModeList = map[uint8]PSKModeInfo{ 0: {Code: 0, Name: "psk_ke", Recommended: true, Reference: "[RFC8446]"}, 1: {Code: 1, Name: "psk_dhe_ke", Recommended: true, Reference: "[RFC8446]"}, 0x0B: {Code: 0x0B, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0x2A: {Code: 0x2A, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0x49: {Code: 0x49, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0x68: {Code: 0x68, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0x87: {Code: 0x87, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0xA6: {Code: 0xA6, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0xC5: {Code: 0xC5, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, 0xE4: {Code: 0xE4, Name: "GREASE", Recommended: false, Reference: "[RFC8701]"}, }
https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-pskkeyexchangemode https://www.rfc-editor.org/rfc/rfc8446.html#section-4.2.9
View Source
var SignatureSchemeList = parseSignatureSchemesCSV()
View Source
var TLSVersionList = map[uint16]TLSVersionInfo{
768: {Code: 768, HexCode: "0300", Name: "SSL 3.0"},
769: {Code: 769, HexCode: "0301", Name: "TLS 1.0"},
770: {Code: 770, HexCode: "0302", Name: "TLS 1.1"},
771: {Code: 771, HexCode: "0303", Name: "TLS 1.2"},
772: {Code: 772, HexCode: "0304", Name: "TLS 1.3"},
0x0A0A: {Code: 0x0A0A, HexCode: "0A0A", Name: "GREASE"},
0x1A1A: {Code: 0x1A1A, HexCode: "1A1A", Name: "GREASE"},
0x2A2A: {Code: 0x2A2A, HexCode: "2A2A", Name: "GREASE"},
0x3A3A: {Code: 0x3A3A, HexCode: "3A3A", Name: "GREASE"},
0x4A4A: {Code: 0x4A4A, HexCode: "4A4A", Name: "GREASE"},
0x5A5A: {Code: 0x5A5A, HexCode: "5A5A", Name: "GREASE"},
0x6A6A: {Code: 0x6A6A, HexCode: "6A6A", Name: "GREASE"},
0x7A7A: {Code: 0x7A7A, HexCode: "7A7A", Name: "GREASE"},
0x8A8A: {Code: 0x8A8A, HexCode: "8A8A", Name: "GREASE"},
0x9A9A: {Code: 0x9A9A, HexCode: "9A9A", Name: "GREASE"},
0xAAAA: {Code: 0xAAAA, HexCode: "AAAA", Name: "GREASE"},
0xBABA: {Code: 0xBABA, HexCode: "BABA", Name: "GREASE"},
0xCACA: {Code: 0xCACA, HexCode: "CACA", Name: "GREASE"},
0xDADA: {Code: 0xDADA, HexCode: "DADA", Name: "GREASE"},
0xEAEA: {Code: 0xEAEA, HexCode: "EAEA", Name: "GREASE"},
0xFAFA: {Code: 0xFAFA, HexCode: "FAFA", Name: "GREASE"},
}
Functions ¶
This section is empty.
Types ¶
type CertComprAlgo ¶
type CertComprAlgo any // (uint16 | CertComprAlgoInfo)
type CertComprAlgoInfo ¶
func GetCertComprAlgoInfo ¶
func GetCertComprAlgoInfo(algoCode uint16, mustName bool) CertComprAlgoInfo
type CipherSuite ¶
type CipherSuite any // (uint16 | CipherSuiteInfo)
type CipherSuiteInfo ¶
type CipherSuiteInfo = struct { Code uint16 `json:"code"` HexCode string `json:"hex_code"` Name string `json:"name"` Recommended bool `json:"recommended"` Reference string `json:"-"` }
func GetCipherSuiteInfo ¶
func GetCipherSuiteInfo(cipherSuiteCode uint16, mustName bool) CipherSuiteInfo
type ClientHelloMsg ¶
type ClientHelloMsg struct { Raw byteSlice `json:"raw"` RecordHeaderTLSVersion TLSVersion `json:"record_header_tls_version"` // TLSv1.0 (769) TLSVersion TLSVersion `json:"client_tls_version"` // TLSv1.2 (771) Random byteSlice `json:"random"` SessionID byteSlice `json:"session_id"` CipherSuites []CipherSuite `json:"cipher_suites"` CompressionMethods []CompressionMethod `json:"compression_methods"` Extensions []Extension `json:"extensions"` Highlights highlights `json:"highlights"` }
func (*ClientHelloMsg) AddCertComprAlgoInfo ¶
func (m *ClientHelloMsg) AddCertComprAlgoInfo()
func (*ClientHelloMsg) AddCipherSuiteInfo ¶
func (m *ClientHelloMsg) AddCipherSuiteInfo()
func (*ClientHelloMsg) AddCompressionMethodInfo ¶
func (m *ClientHelloMsg) AddCompressionMethodInfo()
func (*ClientHelloMsg) AddECPointFormatInfo ¶
func (m *ClientHelloMsg) AddECPointFormatInfo()
func (*ClientHelloMsg) AddInfo ¶
func (m *ClientHelloMsg) AddInfo()
Add information about TLS versions, cipher suites, etc.
func (*ClientHelloMsg) AddNamedGroupInfo ¶
func (m *ClientHelloMsg) AddNamedGroupInfo()
func (*ClientHelloMsg) AddPSKModeInfo ¶
func (m *ClientHelloMsg) AddPSKModeInfo()
func (*ClientHelloMsg) AddSignatureSchemeInfo ¶
func (m *ClientHelloMsg) AddSignatureSchemeInfo()
func (*ClientHelloMsg) AddTLSVersionInfo ¶
func (m *ClientHelloMsg) AddTLSVersionInfo()
func (*ClientHelloMsg) GetCertComprAlgos ¶
func (m *ClientHelloMsg) GetCertComprAlgos() []CertComprAlgo
func (*ClientHelloMsg) GetSignatureSchemes ¶
func (m *ClientHelloMsg) GetSignatureSchemes() []SignatureScheme
func (*ClientHelloMsg) GetSupportedGroups ¶
func (m *ClientHelloMsg) GetSupportedGroups() []NamedGroup
func (*ClientHelloMsg) GetSupportedPointFormats ¶
func (m *ClientHelloMsg) GetSupportedPointFormats() []ECPointFormat
func (*ClientHelloMsg) GetSupportedVersions ¶
func (m *ClientHelloMsg) GetSupportedVersions() []TLSVersion
func (*ClientHelloMsg) Unmarshal ¶
func (m *ClientHelloMsg) Unmarshal(data []byte) bool
type CompressionMethod ¶
type CompressionMethod any // (uint8 | CompressionMethodInfo)
type CompressionMethodInfo ¶
func GetCompressionMethodInfo ¶
func GetCompressionMethodInfo(compressionMethodCode uint8) CompressionMethodInfo
type ECPointFormat ¶
type ECPointFormat any // (uint8 | ECPointFormatInfo)
type ECPointFormatInfo ¶
type ECPointFormatInfo struct { Code uint8 `json:"code"` Name string `json:"name"` Reference string `json:"-"` }
func GetECPointFormatInfo ¶
func GetECPointFormatInfo(ecPointFormatCode uint8, mustName bool) ECPointFormatInfo
type Extension ¶
type Extension struct { Code uint16 `json:"code"` Name string `json:"name"` Recommended bool `json:"-"` Reference string `json:"-"` Data ExtensionData `json:"data"` }
func GetExtensionInfo ¶
type ExtensionData ¶
type ExtensionData struct { Raw byteSlice `json:"raw"` ServerName string `json:"server_name,omitempty"` StatusType uint8 `json:"status_type,omitempty"` SupportedGroups []NamedGroup `json:"supported_groups,omitempty"` SupportedPointFormats []ECPointFormat `json:"supported_point_formats,omitempty"` SupportedSignatureAlgorithms []SignatureScheme `json:"supported_signature_algorithms,omitempty"` RenegotiationInfo []byte `json:"renegotiation_info,omitempty"` ALPNProtocols []string `json:"alpn_protocols,omitempty"` SupportedVersions []TLSVersion `json:"supported_tls_versions,omitempty"` Cookie byteSlice `json:"cookie,omitempty"` CertificateCompressionAlgos []CertComprAlgo `json:"compression_algorithms,omitempty"` PSKModes []PSKMode `json:"psk_modes,omitempty"` PSKIdentities []PSKIdentity `json:"psk_identities,omitempty"` PSKBinders []byteSlice `json:"psk_binders,omitempty"` RecordSizeLimit uint16 `json:"record_size_limit,omitempty"` Length uint16 `json:"length,omitempty"` // padding }
type NamedGroup ¶
type NamedGroup any // (uint16 | NamedGroupInfo)
type NamedGroupInfo ¶
type NamedGroupInfo struct { Code uint16 `json:"code"` HexCode string `json:"hex_code"` Name string `json:"name"` Recommended bool `json:"-"` Reference string `json:"-"` }
func GetNamedGroupInfo ¶
func GetNamedGroupInfo(namedGroupCode uint16, mustName bool) NamedGroupInfo
type PSKIdentity ¶
type PSKIdentity struct { Identity byteSlice `json:"identity"` ObfuscatedTicketAge uint32 `json:"obfuscated_ticket_age"` }
TLS 1.3 PSK Identity. Can be a Session Ticket, or a reference to a saved session. See RFC 8446, Section 4.2.11.
type PSKModeInfo ¶
type PSKModeInfo struct { Code uint8 `json:"code"` Name string `json:"name"` Recommended bool `json:"-"` Reference string `json:"-"` }
func GetPSKModeInfo ¶
func GetPSKModeInfo(pskModeCode uint8) PSKModeInfo
type SignatureScheme ¶
type SignatureScheme any // (uint16 | SignatureSchemeInfo)
type SignatureSchemeInfo ¶
type SignatureSchemeInfo struct { Code uint16 `json:"code"` HexCode string `json:"hex_code"` Name string `json:"name"` Recommended bool `json:"recommended"` Reference string `json:"-"` }
func GetSignatureSchemeInfo ¶
func GetSignatureSchemeInfo(sigSchemeCode uint16, mustName bool) SignatureSchemeInfo
type TLSVersion ¶
type TLSVersion any // (uint16 | TLSVersioninfo)
type TLSVersionInfo ¶
type TLSVersionInfo struct { Code uint16 `json:"code"` HexCode string `json:"hex_code"` Name string `json:"name"` }
func GetTLSVersionInfo ¶
func GetTLSVersionInfo(tlsVersionCode uint16, mustName bool) TLSVersionInfo
Click to show internal directories.
Click to hide internal directories.