aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/sessions_sqlite
diff options
context:
space:
mode:
authorlloyd <[email protected]>2012-03-22 15:59:24 +0000
committerlloyd <[email protected]>2012-03-22 15:59:24 +0000
commit544171d3e20d65f17a1d3955388a8db4f04cfe44 (patch)
tree18cffe0f9fae50ed2ba935d4bb1c882a05200f17 /src/tls/sessions_sqlite
parentcc9e16e623466d3d7a71b69736a816e665302bd4 (diff)
Working client-side session tickets. Tested against gmail.com and
OpenSSL 1.0.1-beta2 running on localhost.
Diffstat (limited to 'src/tls/sessions_sqlite')
-rw-r--r--src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
index 7605313ff..61e68a7b4 100644
--- a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
+++ b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
@@ -191,7 +191,8 @@ void Session_Manager_SQLite::remove_entry(const MemoryRegion<byte>& session_id)
void Session_Manager_SQLite::save(const Session& session)
{
- sqlite3_statement stmt(m_db, "insert into " + m_table_name + " values(?1, ?2, ?3, ?4, ?5)");
+ sqlite3_statement stmt(m_db, "insert or replace into " + m_table_name +
+ " values(?1, ?2, ?3, ?4, ?5)");
stmt.bind(1, hex_encode(session.session_id()));
stmt.bind(2, session.start_time());