(isClient bool)
| 979 | const roleServer = false |
| 980 | |
| 981 | func (c *Config) supportedVersions(isClient bool) []uint16 { |
| 982 | versions := make([]uint16, 0, len(supportedVersions)) |
| 983 | for _, v := range supportedVersions { |
| 984 | if (c == nil || c.MinVersion == 0) && |
| 985 | isClient && v < VersionTLS12 { |
| 986 | continue |
| 987 | } |
| 988 | if c != nil && c.MinVersion != 0 && v < c.MinVersion { |
| 989 | continue |
| 990 | } |
| 991 | if c != nil && c.MaxVersion != 0 && v > c.MaxVersion { |
| 992 | continue |
| 993 | } |
| 994 | versions = append(versions, v) |
| 995 | } |
| 996 | return versions |
| 997 | } |
| 998 | |
| 999 | func (c *Config) maxSupportedVersion(isClient bool) uint16 { |
| 1000 | supportedVersions := c.supportedVersions(isClient) |
no outgoing calls
no test coverage detected