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)
| 44 | // (e.g. "TLS 1.3"), or a fallback representation of the value if the |
| 45 | // version is not implemented by this package. |
| 46 | func 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 | |
| 63 | const ( |
| 64 | maxPlaintext = 16384 // maximum plaintext payload length |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…