summaryrefslogtreecommitdiff
path: root/louloulibs/network
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2016-02-10 20:10:40 +0100
committerFlorent Le Coz <louiz@louiz.org>2016-02-10 20:10:40 +0100
commita13285d0ff360d0a83e007a776d9efbcfc347c76 (patch)
tree312e2cb7f57982e01d5a5b0a05225d01c513f2cb /louloulibs/network
parent0a352e557d2a0760601847a97c562759fb04d529 (diff)
downloadbiboumi-a13285d0ff360d0a83e007a776d9efbcfc347c76.tar.gz
biboumi-a13285d0ff360d0a83e007a776d9efbcfc347c76.tar.bz2
biboumi-a13285d0ff360d0a83e007a776d9efbcfc347c76.tar.xz
biboumi-a13285d0ff360d0a83e007a776d9efbcfc347c76.zip
Rename BasicCredentialManager
Diffstat (limited to 'louloulibs/network')
-rw-r--r--louloulibs/network/credentials_manager.cpp24
-rw-r--r--louloulibs/network/credentials_manager.hpp4
-rw-r--r--louloulibs/network/tcp_socket_handler.hpp2
3 files changed, 15 insertions, 15 deletions
diff --git a/louloulibs/network/credentials_manager.cpp b/louloulibs/network/credentials_manager.cpp
index f92aef8..d5b0eb3 100644
--- a/louloulibs/network/credentials_manager.cpp
+++ b/louloulibs/network/credentials_manager.cpp
@@ -21,10 +21,10 @@ static const std::vector<std::string> default_cert_files = {
"/etc/ca-certificates/extracted/tls-ca-bundle.pem"
};
-Botan::Certificate_Store_In_Memory Basic_Credentials_Manager::certificate_store;
-bool Basic_Credentials_Manager::certs_loaded = false;
+Botan::Certificate_Store_In_Memory BasicCredentialsManager::certificate_store;
+bool BasicCredentialsManager::certs_loaded = false;
-Basic_Credentials_Manager::Basic_Credentials_Manager(const TCPSocketHandler* const socket_handler):
+BasicCredentialsManager::BasicCredentialsManager(const TCPSocketHandler* const socket_handler):
Botan::Credentials_Manager(),
socket_handler(socket_handler),
trusted_fingerprint{}
@@ -32,14 +32,14 @@ Basic_Credentials_Manager::Basic_Credentials_Manager(const TCPSocketHandler* con
this->load_certs();
}
-void Basic_Credentials_Manager::set_trusted_fingerprint(const std::string& fingerprint)
+void BasicCredentialsManager::set_trusted_fingerprint(const std::string& fingerprint)
{
this->trusted_fingerprint = fingerprint;
}
-void Basic_Credentials_Manager::verify_certificate_chain(const std::string& type,
- const std::string& purported_hostname,
- const std::vector<Botan::X509_Certificate>& certs)
+void BasicCredentialsManager::verify_certificate_chain(const std::string& type,
+ const std::string& purported_hostname,
+ const std::vector<Botan::X509_Certificate>& certs)
{
log_debug("Checking remote certificate (" << type << ") for hostname " << purported_hostname);
try
@@ -62,10 +62,10 @@ void Basic_Credentials_Manager::verify_certificate_chain(const std::string& type
}
}
-void Basic_Credentials_Manager::load_certs()
+void BasicCredentialsManager::load_certs()
{
// Only load the certificates the first time
- if (Basic_Credentials_Manager::certs_loaded)
+ if (BasicCredentialsManager::certs_loaded)
return;
const std::string conf_path = Config::get("ca_file", "");
std::vector<std::string> paths;
@@ -82,7 +82,7 @@ void Basic_Credentials_Manager::load_certs()
while (!bundle.end_of_data() && bundle.check_available(27))
{
const Botan::X509_Certificate cert(bundle);
- Basic_Credentials_Manager::certificate_store.add_certificate(cert);
+ BasicCredentialsManager::certificate_store.add_certificate(cert);
}
// Only use the first file that can successfully be read.
goto success;
@@ -95,10 +95,10 @@ void Basic_Credentials_Manager::load_certs()
// If we could not open one of the files, print a warning
log_warning("The CA could not be loaded, TLS negociation will probably fail.");
success:
- Basic_Credentials_Manager::certs_loaded = true;
+ BasicCredentialsManager::certs_loaded = true;
}
-std::vector<Botan::Certificate_Store*> Basic_Credentials_Manager::trusted_certificate_authorities(const std::string&, const std::string&)
+std::vector<Botan::Certificate_Store*> BasicCredentialsManager::trusted_certificate_authorities(const std::string&, const std::string&)
{
return {&this->certificate_store};
}
diff --git a/louloulibs/network/credentials_manager.hpp b/louloulibs/network/credentials_manager.hpp
index dbd1d95..153c4d6 100644
--- a/louloulibs/network/credentials_manager.hpp
+++ b/louloulibs/network/credentials_manager.hpp
@@ -10,10 +10,10 @@
class TCPSocketHandler;
-class Basic_Credentials_Manager: public Botan::Credentials_Manager
+class BasicCredentialsManager: public Botan::Credentials_Manager
{
public:
- Basic_Credentials_Manager(const TCPSocketHandler* const socket_handler);
+ BasicCredentialsManager(const TCPSocketHandler* const socket_handler);
void verify_certificate_chain(const std::string& type,
const std::string& purported_hostname,
const std::vector<Botan::X509_Certificate>&) override final;
diff --git a/louloulibs/network/tcp_socket_handler.hpp b/louloulibs/network/tcp_socket_handler.hpp
index fb4195d..62b2ce7 100644
--- a/louloulibs/network/tcp_socket_handler.hpp
+++ b/louloulibs/network/tcp_socket_handler.hpp
@@ -249,7 +249,7 @@ private:
static Botan::TLS::Policy policy;
static Botan::TLS::Session_Manager_In_Memory session_manager;
protected:
- Basic_Credentials_Manager credential_manager;
+ BasicCredentialsManager credential_manager;
private:
/**
* We use a unique_ptr because we may not want to create the object at