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
This commit is contained in:
1 parent
80c5a0e150
commit
b49594ea3e
1 file changed
+1
-1
@@ -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 ;
|
||||
|
||||
Reference in new issue
Block a user