summaryrefslogtreecommitdiff
path: root/louloulibs/network/credentials_manager.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-11-03 16:56:38 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-11-05 02:17:19 +0100
commite8386bd14e9783f0bef39bdf577545522e33e719 (patch)
tree6466025811c0dfdd085e96da2e40b7eee8741323 /louloulibs/network/credentials_manager.hpp
parent06db9b366a83121e0c914e527a367f90ec71940a (diff)
downloadbiboumi-e8386bd14e9783f0bef39bdf577545522e33e719.tar.gz
biboumi-e8386bd14e9783f0bef39bdf577545522e33e719.tar.bz2
biboumi-e8386bd14e9783f0bef39bdf577545522e33e719.tar.xz
biboumi-e8386bd14e9783f0bef39bdf577545522e33e719.zip
Provide an adhoc option to let user pass the cert verif for some IRC servers
Diffstat (limited to 'louloulibs/network/credentials_manager.hpp')
-rw-r--r--louloulibs/network/credentials_manager.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/louloulibs/network/credentials_manager.hpp b/louloulibs/network/credentials_manager.hpp
index 8641f1d..e292321 100644
--- a/louloulibs/network/credentials_manager.hpp
+++ b/louloulibs/network/credentials_manager.hpp
@@ -8,10 +8,12 @@
#include <botan/botan.h>
#include <botan/tls_client.h>
+class TCPSocketHandler;
+
class Basic_Credentials_Manager: public Botan::Credentials_Manager
{
public:
- Basic_Credentials_Manager();
+ Basic_Credentials_Manager(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;
@@ -19,8 +21,11 @@ public:
const std::string& context) override final;
private:
- void load_certs();
- Botan::Certificate_Store_In_Memory certificate_store;
+ const TCPSocketHandler* const socket_handler;
+
+ static void load_certs();
+ static Botan::Certificate_Store_In_Memory certificate_store;
+ static bool certs_loaded;
};
#endif //BOTAN_FOUND