GetTLSVersion returns the go-representation of the TLS version.
()
| 34 | |
| 35 | // GetTLSVersion returns the go-representation of the TLS version. |
| 36 | func (t TLSVersion) GetTLSVersion() uint16 { |
| 37 | switch t { |
| 38 | case TLSVersion13: |
| 39 | return tls.VersionTLS12 |
| 40 | case TLSVersion12: |
| 41 | return tls.VersionTLS12 |
| 42 | default: |
| 43 | panic(fmt.Errorf("invalid TLS version: %s", t)) |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // ECDHCurveList is a list of supported ECDHCurve |
| 48 | type ECDHCurveList []ECDHCurve |
no test coverage detected