MCPcopy
hub / github.com/XTLS/REALITY / ClientSessionCache

Interface ClientSessionCache

common.go:373–383  ·  view source on GitHub ↗

ClientSessionCache is a cache of ClientSessionState objects that can be used by a client to resume a TLS session with a given server. ClientSessionCache implementations should expect to be called concurrently from different goroutines. Up to TLS 1.2, only ticket-based resumption is supported, not Se

Source from the content-addressed store, hash-verified

371// SessionID-based resumption. In TLS 1.3 they were merged into PSK modes, which
372// are supported via this interface.
373type ClientSessionCache interface {
374 // Get searches for a ClientSessionState associated with the given key.
375 // On return, ok is true if one was found.
376 Get(sessionKey string) (session *ClientSessionState, ok bool)
377
378 // Put adds the ClientSessionState to the cache with the given key. It might
379 // get called multiple times in a connection if a TLS 1.3 server provides
380 // more than one session ticket. If called with a nil *ClientSessionState,
381 // it should remove the cache entry.
382 Put(sessionKey string, cs *ClientSessionState)
383}
384
385//go:generate stringer -linecomment -type=SignatureScheme,CurveID,ClientAuthType -output=common_string.go
386

Callers 8

writeRecordLockedMethod · 0.65
loadSessionMethod · 0.65
writeRecordLockedMethod · 0.65
clientHandshakeMethod · 0.65
loadSessionMethod · 0.65
saveSessionTicketMethod · 0.65
StoreSessionMethod · 0.65

Implementers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…