From 65b3ffb37074b38c05022c28bd335338e236cf66 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 7 Jul 2019 14:47:07 +0200 Subject: [PATCH] Some debug info --- src/protocol/CryptionHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/protocol/CryptionHandler.cpp b/src/protocol/CryptionHandler.cpp index 93cc135..1fdb84d 100644 --- a/src/protocol/CryptionHandler.cpp +++ b/src/protocol/CryptionHandler.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "misc/memtracker.h" #include "misc/digest.h" #include "CryptionHandler.h" @@ -45,6 +46,7 @@ bool CryptionHandler::setupSharedSecret(const std::string& alpha, const std::str error = "Could not calculate shared secret. Message: " + string(error_to_string(err)); return false; } + debugMessage(0, "ecc_shared_secret: {}", base64::encode((char*) buffer, buffer_length)); auto result = this->setupSharedSecret(alpha, beta, string((const char*) buffer, buffer_length), error); return result; @@ -65,10 +67,12 @@ bool CryptionHandler::setupSharedSecret(const std::string& alpha, const std::str lock_guard lock(this->cache_key_lock); memcpy(this->iv_struct, ivStruct, SHA_DIGEST_LENGTH); this->iv_struct_length = SHA_DIGEST_LENGTH; + debugMessage(0, "iv_struct: {}", base64::encode((char*) this->iv_struct, SHA_DIGEST_LENGTH)); auto iv_hash = digest::sha1(ivStruct, SHA_DIGEST_LENGTH); memcpy(this->current_mac, iv_hash.data(), 8); + debugMessage(0, "Mac: {}", base64::encode((char*) this->current_mac, 8)); this->useDefaultChipherKeyNonce = false; }