summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-04-28 14:17:43 +0200
committerlouiz’ <louiz@louiz.org>2018-04-28 14:17:43 +0200
commitefa63ee5cb4be3aebc1489dc9db936eea26660d4 (patch)
treebc8ac3d71e01738aad00d1a91ab35a75ad90d6c6
parent1236b8a03bee403fcaa59d882d8e7fb9058b2280 (diff)
parentd887baa064318fdb350fb6c3f7b8e2104a644fcb (diff)
downloadbiboumi-efa63ee5cb4be3aebc1489dc9db936eea26660d4.tar.gz
biboumi-efa63ee5cb4be3aebc1489dc9db936eea26660d4.tar.bz2
biboumi-efa63ee5cb4be3aebc1489dc9db936eea26660d4.tar.xz
biboumi-efa63ee5cb4be3aebc1489dc9db936eea26660d4.zip
Merge branch 'v7'
-rw-r--r--CHANGELOG.rst6
-rw-r--r--src/network/tcp_client_socket_handler.cpp15
2 files changed, 17 insertions, 4 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 889321c..4966a3c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -20,6 +20,12 @@ Version 8.0
the user force a nickname whenever a channel on the server is joined.
- Multiple admins can now be listed in the admin field, separated with a colon.
+Version 7.3
+===========
+
+- Fix an uncaught exception with botan, when policy does not allow any
+ available ciphersuite.
+
Version 7.2 - 2018-01-24
========================
diff --git a/src/network/tcp_client_socket_handler.cpp b/src/network/tcp_client_socket_handler.cpp
index aac13d0..9dda73d 100644
--- a/src/network/tcp_client_socket_handler.cpp
+++ b/src/network/tcp_client_socket_handler.cpp
@@ -146,15 +146,22 @@ void TCPClientSocketHandler::connect(const std::string& address, const std::stri
|| errno == EISCONN)
{
log_info("Connection success.");
+#ifdef BOTAN_FOUND
+ if (this->use_tls)
+ try {
+ this->start_tls(this->address, this->port);
+ } catch (const Botan::Exception& e)
+ {
+ this->on_connection_failed("TLS error: "s + e.what());
+ this->close();
+ return ;
+ }
+#endif
TimedEventsManager::instance().cancel("connection_timeout" +
std::to_string(this->socket));
this->poller->add_socket_handler(this);
this->connected = true;
this->connecting = false;
-#ifdef BOTAN_FOUND
- if (this->use_tls)
- this->start_tls(this->address, this->port);
-#endif
this->connection_date = std::chrono::system_clock::now();
// Get our local TCP port and store it