Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::TLS::Session_Manager Class Referenceabstract

`#include <tls_session_manager.h>`

Inheritance diagram for Botan::TLS::Session_Manager:

## Public Member Functions
virtual bool | load_from_server_info (const Server_Information &info, Session &session)=0
virtual bool | load_from_session_id (const std::vector< uint8_t > &session_id, Session &session)=0
virtual size_t | remove_all ()=0
virtual void | remove_entry (const std::vector< uint8_t > &session_id)=0
virtual void | save (const Session &session)=0
virtual std::chrono::seconds | session_lifetime () const =0
virtual | ~Session_Manager ()

## Detailed Description

Session_Manager 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

Definition at line 29 of file tls_session_manager.h.

## Constructor & Destructor Documentation

virtual Botan::TLS::Session_Manager::~Session_Manager | ( |  | ) |
| inline virtual

Definition at line 79 of file tls_session_manager.h.

79 {}

## Member Function Documentation

virtual bool Botan::TLS::Session_Manager::load_from_server_info | ( | const Server_Information & | info,
|  | Session & | session
| ) |  |
| pure virtual

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

Parameters

  info | the information about the server
  session | will be set to the saved session data (if found), or not modified if not found

Returns
  true if session was modified

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

virtual bool Botan::TLS::Session_Manager::load_from_session_id | ( | const std::vector< uint8_t > & | session_id,
|  | Session & | session
| ) |  |
| pure virtual

Try to load a saved session (using session ID)

Parameters

  session_id | the session identifier we are trying to resume
  session | will be set to the saved session data (if found), or not modified if not found

Returns
  true if session was modified

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

virtual size_t Botan::TLS::Session_Manager::remove_all | ( |  | ) |
| pure virtual

Remove all sessions from the cache, return number of sessions deleted

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

virtual void Botan::TLS::Session_Manager::remove_entry | ( | const std::vector< uint8_t > & | session_id | ) |
| pure virtual

Remove this session id from the cache, if it exists

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

Referenced by Botan::TLS::Channel::send_alert().

virtual void Botan::TLS::Session_Manager::save | ( | const Session & | session | ) |
| pure virtual

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 load_from_* will result in a successful lookup.

Parameters

  session | to save

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

virtual std::chrono::seconds Botan::TLS::Session_Manager::session_lifetime | ( |  | ) | const
| pure virtual

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

Implemented in Botan::TLS::Session_Manager_In_Memory, Botan::TLS::Session_Manager_Noop, and Botan::TLS::Session_Manager_SQL.

The documentation for this class was generated from the following file:

- src/lib/tls/tls_session_manager.h