summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibTLS/ClientHandshake.cpp
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2021-02-07 15:33:24 +0330
committerAndreas Kling <kling@serenityos.org>2021-02-08 18:08:55 +0100
commit09a43969ba957b3484cc9387344fea145f46aa46 (patch)
tree0e2077e1d8af02b06e39cb4ca6cbfcba37052c73 /Userland/Libraries/LibTLS/ClientHandshake.cpp
parent1f8a633cc762fc3ca8544ee75ce25a7a8860d4be (diff)
downloadserenity-09a43969ba957b3484cc9387344fea145f46aa46.zip
Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
Diffstat (limited to 'Userland/Libraries/LibTLS/ClientHandshake.cpp')
-rw-r--r--Userland/Libraries/LibTLS/ClientHandshake.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibTLS/ClientHandshake.cpp b/Userland/Libraries/LibTLS/ClientHandshake.cpp
index 60498e7366..39f2193a8e 100644
--- a/Userland/Libraries/LibTLS/ClientHandshake.cpp
+++ b/Userland/Libraries/LibTLS/ClientHandshake.cpp
@@ -112,7 +112,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
return (i8)Error::NoCommonCipher;
}
m_context.cipher = cipher;
- dbgln<TLS_DEBUG>("Cipher: {}", (u16)cipher);
+ dbgln_if(TLS_DEBUG, "Cipher: {}", (u16)cipher);
// The handshake hash function is _always_ SHA256
m_context.handshake_hash.initialize(Crypto::Hash::HashKind::SHA256);
@@ -146,7 +146,7 @@ ssize_t TLSv12::handle_hello(ReadonlyBytes buffer, WritePacketStage& write_packe
u16 extension_length = AK::convert_between_host_and_network_endian(*(const u16*)buffer.offset_pointer(res));
res += 2;
- dbgln<TLS_DEBUG>("extension {} with length {}", (u16)extension_type, extension_length);
+ dbgln_if(TLS_DEBUG, "extension {} with length {}", (u16)extension_type, extension_length);
if (extension_length) {
if (buffer.size() - res < extension_length) {
@@ -218,12 +218,12 @@ ssize_t TLSv12::handle_finished(ReadonlyBytes buffer, WritePacketStage& write_pa
u32 size = buffer[0] * 0x10000 + buffer[1] * 0x100 + buffer[2];
if (size < 12) {
- dbgln<TLS_DEBUG>("finished packet smaller than minimum size: {}", size);
+ dbgln_if(TLS_DEBUG, "finished packet smaller than minimum size: {}", size);
return (i8)Error::BrokenPacket;
}
if (size < buffer.size() - index) {
- dbgln<TLS_DEBUG>("not enough data after length: {} > {}", size, buffer.size() - index);
+ dbgln_if(TLS_DEBUG, "not enough data after length: {} > {}", size, buffer.size() - index);
return (i8)Error::NeedMoreData;
}
@@ -324,7 +324,7 @@ ssize_t TLSv12::handle_payload(ReadonlyBytes vbuffer)
auto type = buffer[0];
auto write_packets { WritePacketStage::Initial };
size_t payload_size = buffer[1] * 0x10000 + buffer[2] * 0x100 + buffer[3] + 3;
- dbgln<TLS_DEBUG>("payload size: {} buffer length: {}", payload_size, buffer_length);
+ dbgln_if(TLS_DEBUG, "payload size: {} buffer length: {}", payload_size, buffer_length);
if (payload_size + 1 > buffer_length)
return (i8)Error::NeedMoreData;