clientSessionCacheKey returns a key used to cache sessionTickets that could be used to resume previously negotiated TLS sessions with a server.
(serverAddr net.Addr, config *Config)
| 984 | // clientSessionCacheKey returns a key used to cache sessionTickets that could |
| 985 | // be used to resume previously negotiated TLS sessions with a server. |
| 986 | func clientSessionCacheKey(serverAddr net.Addr, config *Config) string { |
| 987 | if len(config.ServerName) > 0 { |
| 988 | return config.ServerName |
| 989 | } |
| 990 | return serverAddr.String() |
| 991 | } |
| 992 | |
| 993 | // hostnameInSNI converts name into an appropriate hostname for SNI. |
| 994 | // Literal IP addresses and absolute FQDNs are not permitted as SNI values. |
no test coverage detected
searching dependent graphs…