Botan  2.8.0
Crypto and TLS for C++11
Public Member Functions | List of all members
Botan::TLS::Session_Manager_Noop Class Referencefinal

#include <tls_session_manager.h>

Inheritance diagram for Botan::TLS::Session_Manager_Noop:
Botan::TLS::Session_Manager

Public Member Functions

bool load_from_server_info (const Server_Information &, Session &) override
 
bool load_from_session_id (const std::vector< uint8_t > &, Session &) override
 
size_t remove_all () override
 
void remove_entry (const std::vector< uint8_t > &) override
 
void save (const Session &) override
 
std::chrono::seconds session_lifetime () const override
 

Detailed Description

An implementation of Session_Manager that does not save sessions at all, preventing session resumption.

Definition at line 86 of file tls_session_manager.h.

Member Function Documentation

◆ load_from_server_info()

bool Botan::TLS::Session_Manager_Noop::load_from_server_info ( const Server_Information info,
Session session 
)
inlineoverridevirtual

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

Parameters
infothe information about the server
sessionwill be set to the saved session data (if found), or not modified if not found
Returns
true if session was modified

Implements Botan::TLS::Session_Manager.

Definition at line 92 of file tls_session_manager.h.

93  { return false; }

◆ load_from_session_id()

bool Botan::TLS::Session_Manager_Noop::load_from_session_id ( const std::vector< uint8_t > &  session_id,
Session session 
)
inlineoverridevirtual

Try to load a saved session (using session ID)

Parameters
session_idthe session identifier we are trying to resume
sessionwill be set to the saved session data (if found), or not modified if not found
Returns
true if session was modified

Implements Botan::TLS::Session_Manager.

Definition at line 89 of file tls_session_manager.h.

90  { return false; }

◆ remove_all()

size_t Botan::TLS::Session_Manager_Noop::remove_all ( )
inlineoverridevirtual

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

Implements Botan::TLS::Session_Manager.

Definition at line 97 of file tls_session_manager.h.

97 { return 0; }

◆ remove_entry()

void Botan::TLS::Session_Manager_Noop::remove_entry ( const std::vector< uint8_t > &  session_id)
inlineoverridevirtual

Remove this session id from the cache, if it exists

Implements Botan::TLS::Session_Manager.

Definition at line 95 of file tls_session_manager.h.

95 {}

◆ save()

void Botan::TLS::Session_Manager_Noop::save ( const Session session)
inlineoverridevirtual

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
sessionto save

Implements Botan::TLS::Session_Manager.

Definition at line 99 of file tls_session_manager.h.

99 {}

◆ session_lifetime()

std::chrono::seconds Botan::TLS::Session_Manager_Noop::session_lifetime ( ) const
inlineoverridevirtual

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

Implements Botan::TLS::Session_Manager.

Definition at line 101 of file tls_session_manager.h.

102  { return std::chrono::seconds(0); }

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