Botan
2.1.0
Crypto and TLS for C++11
Main Page
Namespaces
Classes
Files
File List
File Members
src
lib
tls
sessions_sqlite3
tls_session_manager_sqlite.h
Go to the documentation of this file.
1
/*
2
* SQLite3 TLS Session Manager
3
* (C) 2012 Jack Lloyd
4
*
5
* Botan is released under the Simplified BSD License (see license.txt)
6
*/
7
8
#ifndef BOTAN_TLS_SQLITE3_SESSION_MANAGER_H__
9
#define BOTAN_TLS_SQLITE3_SESSION_MANAGER_H__
10
11
#include <botan/tls_session_manager_sql.h>
12
#include <botan/rng.h>
13
14
namespace
Botan
{
15
16
namespace
TLS {
17
18
/**
19
* An implementation of Session_Manager that saves values in a SQLite3
20
* database file, with the session data encrypted using a passphrase.
21
*
22
* @warning For clients, the hostnames associated with the saved
23
* sessions are stored in the database in plaintext. This may be a
24
* serious privacy risk in some situations.
25
*/
26
class
BOTAN_DLL
27
Session_Manager_SQLite
:
public
Session_Manager_SQL
28
{
29
public
:
30
/**
31
* @param passphrase used to encrypt the session data
32
* @param rng a random number generator
33
* @param db_filename filename of the SQLite database file.
34
The table names tls_sessions and tls_sessions_metadata
35
will be used
36
* @param max_sessions a hint on the maximum number of sessions
37
* to keep in memory at any one time. (If zero, don't cap)
38
* @param session_lifetime sessions are expired after this many
39
* seconds have elapsed from initial handshake.
40
*/
41
Session_Manager_SQLite
(
const
std::string& passphrase,
42
RandomNumberGenerator
& rng,
43
const
std::string& db_filename,
44
size_t
max_sessions = 1000,
45
std::chrono::seconds session_lifetime = std::chrono::seconds(7200));
46
};
47
48
}
49
50
}
51
52
#endif
Botan::RandomNumberGenerator
Definition:
rng.h:25
Botan::TLS::Session_Manager_SQLite
Definition:
tls_session_manager_sqlite.h:26
Botan
Definition:
alg_id.cpp:13
Botan::TLS::Session_Manager_SQL
Definition:
tls_session_manager_sql.h:27
Generated on Fri Aug 4 2017 19:29:39 for Botan by
1.8.9.1