summaryrefslogtreecommitdiff
path: root/louloulibs/network/tcp_socket_handler.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-11-02 03:26:13 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-11-02 03:26:13 +0100
commitf928f7627247ceaafcf3538066ac17609b652aac (patch)
tree4f5740fb8150876a9eaad16c2339f3a338899ebf /louloulibs/network/tcp_socket_handler.hpp
parent7e07a17420117758ca319b5beab6440ff1d634f7 (diff)
downloadbiboumi-f928f7627247ceaafcf3538066ac17609b652aac.tar.gz
biboumi-f928f7627247ceaafcf3538066ac17609b652aac.tar.bz2
biboumi-f928f7627247ceaafcf3538066ac17609b652aac.tar.xz
biboumi-f928f7627247ceaafcf3538066ac17609b652aac.zip
Verify the remote TLS certificates using the system-wide trusted CAs
Diffstat (limited to 'louloulibs/network/tcp_socket_handler.hpp')
-rw-r--r--louloulibs/network/tcp_socket_handler.hpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/louloulibs/network/tcp_socket_handler.hpp b/louloulibs/network/tcp_socket_handler.hpp
index 997d575..d173c1f 100644
--- a/louloulibs/network/tcp_socket_handler.hpp
+++ b/louloulibs/network/tcp_socket_handler.hpp
@@ -1,9 +1,13 @@
#ifndef SOCKET_HANDLER_INCLUDED
# define SOCKET_HANDLER_INCLUDED
+#include "louloulibs.h"
+
#include <network/socket_handler.hpp>
#include <network/resolver.hpp>
+#include <network/credentials_manager.hpp>
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -13,23 +17,6 @@
#include <string>
#include <list>
-#include "louloulibs.h"
-
-#ifdef BOTAN_FOUND
-# include <botan/botan.h>
-# include <botan/tls_client.h>
-
-/**
- * A very simple credential manager that accepts any certificate.
- */
-class Permissive_Credentials_Manager: public Botan::Credentials_Manager
-{
-public:
- void verify_certificate_chain(const std::string& type,
- const std::string& purported_hostname,
- const std::vector<Botan::X509_Certificate>&);
-};
-#endif // BOTAN_FOUND
/**
* An interface, with a series of callbacks that should be implemented in
@@ -243,7 +230,7 @@ private:
* Botan stuff to manipulate a TLS session.
*/
static Botan::AutoSeeded_RNG rng;
- static Permissive_Credentials_Manager credential_manager;
+ static Basic_Credentials_Manager credential_manager;
static Botan::TLS::Policy policy;
static Botan::TLS::Session_Manager_In_Memory session_manager;
/**
@@ -267,3 +254,4 @@ private:
};
#endif // SOCKET_HANDLER_INCLUDED
+