aboutsummaryrefslogtreecommitdiffstats
path: root/src/tls/sessions_sqlite
diff options
context:
space:
mode:
Diffstat (limited to 'src/tls/sessions_sqlite')
-rw-r--r--src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp10
-rw-r--r--src/tls/sessions_sqlite/tls_sqlite_sess_mgr.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
index f4d0e1034..b6aaa3498 100644
--- a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
+++ b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.cpp
@@ -53,7 +53,7 @@ class sqlite3_statement
bind(column, timeval);
}
- void bind(int column, const MemoryRegion<byte>& val)
+ void bind(int column, const std::vector<byte>& val)
{
int rc = sqlite3_bind_blob(m_stmt, column, &val[0], val.size(), SQLITE_TRANSIENT);
if(rc != SQLITE_OK)
@@ -137,7 +137,7 @@ SymmetricKey derive_key(const std::string& passphrase,
{
std::unique_ptr<PBKDF> pbkdf(get_pbkdf("PBKDF2(SHA-512)"));
- SecureVector<byte> x = pbkdf->derive_key(32 + 3,
+ std::vector<byte> x = pbkdf->derive_key(32 + 3,
passphrase,
salt, salt_len,
iterations).bits_of();
@@ -217,7 +217,7 @@ Session_Manager_SQLite::Session_Manager_SQLite(const std::string& passphrase,
// new database case
- MemoryVector<byte> salt = rng.random_vec(16);
+ std::vector<byte> salt = rng.random_vec(16);
const size_t iterations = 64 * 1024;
size_t check_val = 0;
@@ -240,7 +240,7 @@ Session_Manager_SQLite::~Session_Manager_SQLite()
sqlite3_close(m_db);
}
-bool Session_Manager_SQLite::load_from_session_id(const MemoryRegion<byte>& session_id,
+bool Session_Manager_SQLite::load_from_session_id(const std::vector<byte>& session_id,
Session& session)
{
sqlite3_statement stmt(m_db, "select session from tls_sessions where session_id = ?1");
@@ -300,7 +300,7 @@ bool Session_Manager_SQLite::load_from_host_info(const std::string& hostname,
return false;
}
-void Session_Manager_SQLite::remove_entry(const MemoryRegion<byte>& session_id)
+void Session_Manager_SQLite::remove_entry(const std::vector<byte>& session_id)
{
sqlite3_statement stmt(m_db, "delete from tls_sessions where session_id = ?1");
diff --git a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.h b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.h
index cac7affd0..923915496 100644
--- a/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.h
+++ b/src/tls/sessions_sqlite/tls_sqlite_sess_mgr.h
@@ -40,13 +40,13 @@ class BOTAN_DLL Session_Manager_SQLite : public Session_Manager
~Session_Manager_SQLite();
- bool load_from_session_id(const MemoryRegion<byte>& session_id,
+ bool load_from_session_id(const std::vector<byte>& session_id,
Session& session);
bool load_from_host_info(const std::string& hostname, u16bit port,
Session& session);
- void remove_entry(const MemoryRegion<byte>& session_id);
+ void remove_entry(const std::vector<byte>& session_id);
void save(const Session& session_data);