From 57c6264877f6b7d2667ede904df03c83b647d2da Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Wed, 7 Apr 2021 18:51:12 +0200 Subject: [PATCH] LibTLS: Hide some debug spam, use more dbgln_if and if constexpr The debug console was full of 'Update hash with message of size x'. --- Userland/Libraries/LibTLS/Record.cpp | 35 ++++++++++++---------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/Userland/Libraries/LibTLS/Record.cpp b/Userland/Libraries/LibTLS/Record.cpp index 91e0349b8f..bc9894a2ae 100644 --- a/Userland/Libraries/LibTLS/Record.cpp +++ b/Userland/Libraries/LibTLS/Record.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -192,7 +191,7 @@ void TLSv12::update_packet(ByteBuffer& packet) void TLSv12::update_hash(ReadonlyBytes message, size_t header_size) { - dbgln("Update hash with message of size {}", message.size()); + dbgln_if(TLS_DEBUG, "Update hash with message of size {}", message.size()); m_context.handshake_hash.update(message.slice(header_size)); } @@ -201,14 +200,14 @@ ByteBuffer TLSv12::hmac_message(const ReadonlyBytes& buf, const Optional