summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2021-11-22 12:15:38 +0100
committerlouiz’ <louiz@louiz.org>2021-11-22 12:15:38 +0100
commitb49594ea3e847092f93de2443eef36d700ece79d (patch)
treeab7b97358ec691ed5451ea4a29e3e0091803462c
parent80c5a0e150f8d7b165e1681252ac2a09dd3649c7 (diff)
downloadbiboumi-b49594ea3e847092f93de2443eef36d700ece79d.tar.gz
biboumi-b49594ea3e847092f93de2443eef36d700ece79d.tar.bz2
biboumi-b49594ea3e847092f93de2443eef36d700ece79d.tar.xz
biboumi-b49594ea3e847092f93de2443eef36d700ece79d.zip
Catch all botan exception when sending data, not just TLS
On invalid ASN1 file or things that are not specific to TLS only, botan throws other exceptions, and we need to catch those as well. fix #3460
-rw-r--r--src/network/tcp_socket_handler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/tcp_socket_handler.cpp b/src/network/tcp_socket_handler.cpp
index ae23b3c..f5e0d68 100644
--- a/src/network/tcp_socket_handler.cpp
+++ b/src/network/tcp_socket_handler.cpp
@@ -194,7 +194,7 @@ void TCPSocketHandler::send_data(std::string&& data)
if (this->use_tls)
try {
this->tls_send(std::move(data));
- } catch (const Botan::TLS::TLS_Exception& e) {
+ } catch (const Botan::Exception& e) {
this->on_connection_close("TLS error: "s + e.what());
this->close();
return ;