1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 03:17:34 +00:00

Everywhere: Replace a bundle of dbg with dbgln.

These changes are arbitrarily divided into multiple commits to make it
easier to find potentially introduced bugs with git bisect.
This commit is contained in:
asynts 2021-01-11 21:13:30 +01:00 committed by Andreas Kling
parent 4953c73fc1
commit 01879d27c2
12 changed files with 33 additions and 23 deletions

View file

@ -331,7 +331,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
tag);
if (consistency != Crypto::VerificationConsistency::Consistent) {
dbg() << "integrity check failed (tag length " << tag.size() << ")";
dbgln("integrity check failed (tag length {})", tag.size());
auto packet = build_alert(true, (u8)AlertDescription::BadRecordMAC);
write_packet(packet);
@ -373,7 +373,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
auto hmac = hmac_message({ temp_buf, 5 }, decrypted_span.slice(0, length), mac_size);
auto message_mac = ReadonlyBytes { message_hmac, mac_size };
if (hmac != message_mac) {
dbg() << "integrity check failed (mac length " << mac_size << ")";
dbgln("integrity check failed (mac length {})", mac_size);
dbgln("mac received:");
print_buffer(message_mac);
dbgln("mac computed:");
@ -433,7 +433,7 @@ ssize_t TLSv12::handle_message(ReadonlyBytes buffer)
auto level = plain[0];
auto code = plain[1];
if (level == (u8)AlertLevel::Critical) {
dbg() << "We were alerted of a critical error: " << code << " (" << alert_name((AlertDescription)code) << ")";
dbgln("We were alerted of a critical error: {} ({})", code, alert_name((AlertDescription)code));
m_context.critical_error = code;
try_disambiguate_error();
res = (i8)Error::UnknownError;