aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/asn1/oid_lookup/oids.cpp14
-rw-r--r--src/tests/unit_tls.cpp1
-rw-r--r--src/tests/unit_tls_policy.cpp1
3 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/asn1/oid_lookup/oids.cpp b/src/lib/asn1/oid_lookup/oids.cpp
index f49a3daf3..8ee10b75a 100644
--- a/src/lib/asn1/oid_lookup/oids.cpp
+++ b/src/lib/asn1/oid_lookup/oids.cpp
@@ -27,7 +27,7 @@ class OID_Map
void add_str2oid(const OID& oid, const std::string& str)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_str2oid.find(str);
if(i == m_str2oid.end())
m_str2oid.insert(std::make_pair(str, oid));
@@ -35,7 +35,7 @@ class OID_Map
void add_oid2str(const OID& oid, const std::string& str)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_oid2str.find(oid);
if(i == m_oid2str.end())
m_oid2str.insert(std::make_pair(oid, str));
@@ -43,7 +43,7 @@ class OID_Map
std::string lookup(const OID& oid)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_oid2str.find(oid);
if(i != m_oid2str.end())
@@ -54,7 +54,7 @@ class OID_Map
OID lookup(const std::string& str)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
auto i = m_str2oid.find(str);
if(i != m_str2oid.end())
@@ -72,7 +72,7 @@ class OID_Map
bool have_oid(const std::string& str)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
return m_str2oid.find(str) != m_str2oid.end();
}
@@ -92,14 +92,14 @@ class OID_Map
read_cfg(cfg, "builtin");
}
- std::mutex m_mutex;
+ mutex_type m_mutex;
std::map<std::string, OID> m_str2oid;
std::map<OID, std::string> m_oid2str;
};
void OID_Map::read_cfg(std::istream& cfg, const std::string& source)
{
- std::lock_guard<std::mutex> lock(m_mutex);
+ lock_guard_type<mutex_type> lock(m_mutex);
size_t line = 0;
diff --git a/src/tests/unit_tls.cpp b/src/tests/unit_tls.cpp
index 28abe2d42..0dae9bec5 100644
--- a/src/tests/unit_tls.cpp
+++ b/src/tests/unit_tls.cpp
@@ -19,7 +19,6 @@
#include <botan/x509self.h>
#include <botan/rsa.h>
#include <botan/x509_ca.h>
-#include <botan/auto_rng.h>
#include <botan/hex.h>
#endif
diff --git a/src/tests/unit_tls_policy.cpp b/src/tests/unit_tls_policy.cpp
index 2e5b63f41..95290b933 100644
--- a/src/tests/unit_tls_policy.cpp
+++ b/src/tests/unit_tls_policy.cpp
@@ -10,7 +10,6 @@
#if defined(BOTAN_HAS_TLS)
#include <botan/pubkey.h>
- #include <botan/auto_rng.h>
#include <botan/oids.h>
#include <botan/tls_policy.h>
#endif