clientSessionCacheKey returns a key used to cache sessionTickets that could be used to resume previously negotiated TLS sessions with a server.
()
| 1287 | // clientSessionCacheKey returns a key used to cache sessionTickets that could |
| 1288 | // be used to resume previously negotiated TLS sessions with a server. |
| 1289 | func (c *Conn) clientSessionCacheKey() string { |
| 1290 | if len(c.config.ServerName) > 0 { |
| 1291 | return c.config.ServerName |
| 1292 | } |
| 1293 | if c.conn != nil { |
| 1294 | return c.conn.RemoteAddr().String() |
| 1295 | } |
| 1296 | return "" |
| 1297 | } |
| 1298 | |
| 1299 | // hostnameInSNI converts name into an appropriate hostname for SNI. |
| 1300 | // Literal IP addresses and absolute FQDNs are not permitted as SNI values. |
no test coverage detected