1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:18:12 +00:00

LibTLS: Try to disambiguate errors in case of failure

Not particularly helpful, but better than nothing.
This commit is contained in:
AnotherTest 2020-05-05 13:24:00 +04:30 committed by Andreas Kling
parent fcd922f7b1
commit 2a29e668bd
3 changed files with 74 additions and 28 deletions

View file

@ -282,8 +282,9 @@ ssize_t TLSv12::handle_message(const ByteBuffer& buffer)
auto level = plain[0];
auto code = plain[1];
if (level == (u8)AlertLevel::Critical) {
dbg() << "We were alerted of a critical error: " << code;
dbg() << "We were alerted of a critical error: " << code << " (" << alert_name((AlertDescription)code) << ")";
m_context.critical_error = code;
try_disambiguate_error();
res = (i8)Error::UnknownError;
} else {
dbg() << "Alert: " << code;