MCPcopy Create free account
hub / github.com/XTLS/REALITY / VersionName

Function VersionName

common.go:46–61  ·  view source on GitHub ↗

VersionName returns the name for the provided TLS version number (e.g. "TLS 1.3"), or a fallback representation of the value if the version is not implemented by this package.

(version uint16)

Source from the content-addressed store, hash-verified

44// (e.g. "TLS 1.3"), or a fallback representation of the value if the
45// version is not implemented by this package.
46func VersionName(version uint16) string {
47 switch version {
48 case VersionSSL30:
49 return "SSLv3"
50 case VersionTLS10:
51 return "TLS 1.0"
52 case VersionTLS11:
53 return "TLS 1.1"
54 case VersionTLS12:
55 return "TLS 1.2"
56 case VersionTLS13:
57 return "TLS 1.3"
58 default:
59 return fmt.Sprintf("0x%04X", version)
60 }
61}
62
63const (
64 maxPlaintext = 16384 // maximum plaintext payload length

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…