MCPcopy Create free account
hub / github.com/ContainerSSH/ContainerSSH / GetTLSVersion

Method GetTLSVersion

config/http.go:36–45  ·  view source on GitHub ↗

GetTLSVersion returns the go-representation of the TLS version.

()

Source from the content-addressed store, hash-verified

34
35// GetTLSVersion returns the go-representation of the TLS version.
36func (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
48type ECDHCurveList []ECDHCurve

Callers 2

createTLSConfigFunction · 0.80
createServerTLSConfigFunction · 0.80

Calls 1

ErrorfMethod · 0.65

Tested by

no test coverage detected