MCPcopy
hub / github.com/caddyserver/caddy / register

Method register

modules/caddytls/sessiontickets.go:164–172  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

162// or if ticket key rotation is disabled, this
163// function is a no-op.
164func (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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected