aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-10-17 03:11:14 -0400
committerJack Lloyd <[email protected]>2016-10-17 03:11:14 -0400
commit0b353965a56dabf7528eecf672cc627304dbb8e1 (patch)
treededfd4db3cc140f4a4c2fbba8a566742bc735fd2 /src/lib/tls
parenta816a52612cd8e9cf12bfdccaacc5ce7960b2700 (diff)
parent8b3bda479efecef760f052cc055d3d6d98bf0637 (diff)
Merge GH #665 Add IncludeOS target, make filesystem/threads optional
Diffstat (limited to 'src/lib/tls')
-rw-r--r--src/lib/tls/tls_session_manager.h4
-rw-r--r--src/lib/tls/tls_session_manager_memory.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/tls/tls_session_manager.h b/src/lib/tls/tls_session_manager.h
index e01462f66..49f4925d8 100644
--- a/src/lib/tls/tls_session_manager.h
+++ b/src/lib/tls/tls_session_manager.h
@@ -9,7 +9,7 @@
#define BOTAN_TLS_SESSION_MANAGER_H__
#include <botan/tls_session.h>
-#include <mutex>
+#include <botan/mutex.h>
#include <chrono>
#include <map>
@@ -138,7 +138,7 @@ class BOTAN_DLL Session_Manager_In_Memory : public Session_Manager
bool load_from_session_str(const std::string& session_str,
Session& session);
- std::mutex m_mutex;
+ mutex_type m_mutex;
size_t m_max_sessions;
diff --git a/src/lib/tls/tls_session_manager_memory.cpp b/src/lib/tls/tls_session_manager_memory.cpp
index 37019c943..d0866b37a 100644
--- a/src/lib/tls/tls_session_manager_memory.cpp
+++ b/src/lib/tls/tls_session_manager_memory.cpp
@@ -57,7 +57,7 @@ bool Session_Manager_In_Memory::load_from_session_str(
bool Session_Manager_In_Memory::load_from_session_id(
const std::vector<byte>& session_id, Session& session)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
return load_from_session_str(hex_encode(session_id), session);
}
@@ -65,7 +65,7 @@ bool Session_Manager_In_Memory::load_from_session_id(
bool Session_Manager_In_Memory::load_from_server_info(
const Server_Information& info, Session& session)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_info_sessions.find(info);
@@ -87,7 +87,7 @@ bool Session_Manager_In_Memory::load_from_server_info(
void Session_Manager_In_Memory::remove_entry(
const std::vector<byte>& session_id)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_sessions.find(hex_encode(session_id));
@@ -106,7 +106,7 @@ size_t Session_Manager_In_Memory::remove_all()
void Session_Manager_In_Memory::save(const Session& session)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
if(m_max_sessions != 0)
{