summaryrefslogtreecommitdiff
path: root/louloulibs/network/tcp_socket_handler.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/tcp_socket_handler.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/tcp_socket_handler.hpp')
-rw-r--r--louloulibs/network/tcp_socket_handler.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/louloulibs/network/tcp_socket_handler.hpp b/louloulibs/network/tcp_socket_handler.hpp
index d173c1f..213e286 100644
--- a/louloulibs/network/tcp_socket_handler.hpp
+++ b/louloulibs/network/tcp_socket_handler.hpp
@@ -90,6 +90,16 @@ public:
* The size argument is the size of the last chunk of data that was added to the buffer.
*/
virtual void parse_in_buffer(const size_t size) = 0;
+#ifdef BOTAN_FOUND
+ /**
+ * Tell whether the credential manager should cancel the connection when the
+ * certificate is invalid.
+ */
+ virtual bool abort_on_invalid_cert() const
+ {
+ return true;
+ }
+#endif
bool is_connected() const override final;
bool is_connecting() const;
@@ -230,9 +240,9 @@ private:
* Botan stuff to manipulate a TLS session.
*/
static Botan::AutoSeeded_RNG rng;
- static Basic_Credentials_Manager credential_manager;
static Botan::TLS::Policy policy;
static Botan::TLS::Session_Manager_In_Memory session_manager;
+ Basic_Credentials_Manager credential_manager;
/**
* We use a unique_ptr because we may not want to create the object at
* all. The Botan::TLS::Client object generates a handshake message and