register sets the session ticket keys on cfg and keeps them updated. Any values registered must be unregistered, or they will not be garbage-collected. s.start() must have been called first. If session tickets are disabled or if ticket key rotation is disabled, this function is a no-op.
(cfg *tls.Config)
| 162 | // or if ticket key rotation is disabled, this |
| 163 | // function is a no-op. |
| 164 | func (s *SessionTicketService) register(cfg *tls.Config) { |
| 165 | if s.Disabled || s.DisableRotation { |
| 166 | return |
| 167 | } |
| 168 | s.mu.Lock() |
| 169 | cfg.SetSessionTicketKeys(s.currentKeys) |
| 170 | s.configs[cfg] = struct{}{} |
| 171 | s.mu.Unlock() |
| 172 | } |
| 173 | |
| 174 | // unregister stops session key management on cfg and |
| 175 | // removes the internal stored reference to cfg. If |
no outgoing calls
no test coverage detected