Documentation ¶
Overview ¶
Package tlstext provides simple functions VersionText and CipherSuiteText that provide the raw value to string translations.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CipherFromString ¶ added in v1.2.0
CipherFromString returns the uint16 value of the cipher name or 0 if unknown
func CipherSuite ¶
CipherSuite maps a TLS Cipher Suite to a string or the hex representation if unknown
Example ¶
fmt.Println(CipherSuite(uint16(0xc02b)))
Output: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
func CipherSuiteFromConnection ¶
func CipherSuiteFromConnection(t *tls.ConnectionState) string
CipherSuiteFromConnection returns a string representation of CipherSuite or empty string if not TLS
func Version ¶
Version maps a TLS version to a string, or the hex representation if unknown.
Example ¶
fmt.Println(Version(uint16(0x0303)))
Output: TLS12
func VersionFromConnection ¶
func VersionFromConnection(t *tls.ConnectionState) string
VersionFromConnection returns a string representation of CipherSuite or empty string if not TLS
func VersionFromString ¶ added in v1.2.0
VersionFromString returns the uint16 value of a TLS version string, or 0 if unknown
Types ¶
This section is empty.