TLSSessionManager

TLSSessionManager is an interface to systems which can save session parameters for supporting session resumption.

Saving sessions is done on a best-effort basis; an implementation is allowed to drop sessions due to space constraints.

Implementations should strive to be thread safe

Members

Functions

loadFromServerInfo
bool loadFromServerInfo(TLSServerInformation info, TLSSession session)

Try to load a saved session (using info about server)

loadFromSessionId
bool loadFromSessionId(Vector!ubyte session_id, TLSSession session)

Try to load a saved session (using session ID)

removeEntry
void removeEntry(Vector!ubyte session_id)

Remove this session id from the cache, if it exists

save
void save(TLSSession session)

Save a session on a best effort basis; the manager may not in fact be able to save the session for whatever reason; this is not an error. Caller cannot assume that calling save followed immediately by loadFrom* will result in a successful lookup.

sessionLifetime
Duration sessionLifetime()

Return the allowed lifetime of a session; beyond this time, sessions are not resumed. Returns 0 if unknown/no explicit expiration policy.

Meta