summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-20 21:35:49 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-20 21:35:49 +0200
commit911b461e5d25a30fea1174e6d9b7b9303a21e011 (patch)
tree5fbb294741e4732907fd0a214fb8ddaa0232cce1 /src
parentClean up key requests + autoreload (diff)
downloadnheko-911b461e5d25a30fea1174e6d9b7b9303a21e011.tar.xz
Fix corrupt channel + add additional debugging
Diffstat (limited to 'src')
-rw-r--r--src/Olm.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp

index 79b00774..d6e8c10b 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp
@@ -246,6 +246,8 @@ handle_pre_key_olm_message(const std::string &sender, nhlog::crypto()->debug("decrypted message: \n {}", plaintext.dump(2)); try { + nhlog::crypto()->debug("New olm session: {}", + mtx::crypto::session_id(inbound_session.get())); cache::saveOlmSession( sender_key, std::move(inbound_session), QDateTime::currentMSecsSinceEpoch()); } catch (const lmdb::error &e) { @@ -315,6 +317,8 @@ try_olm_decryption(const std::string &sender_key, const mtx::events::msg::OlmCip try { text = olm::client()->decrypt_message(session->get(), msg.type, msg.body); + nhlog::crypto()->debug("Updated olm session: {}", + mtx::crypto::session_id(session->get())); cache::saveOlmSession( id, std::move(session.value()), QDateTime::currentMSecsSinceEpoch()); } catch (const mtx::crypto::olm_exception &e) { @@ -651,6 +655,8 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s .get<mtx::events::msg::OlmEncrypted>(); try { + nhlog::crypto()->debug("Updated olm session: {}", + mtx::crypto::session_id(session->get())); cache::saveOlmSession(d.keys.at("curve25519:" + device), std::move(*session), QDateTime::currentMSecsSinceEpoch()); @@ -722,6 +728,9 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s .get<mtx::events::msg::OlmEncrypted>(); try { + nhlog::crypto()->debug( + "Updated olm session: {}", + mtx::crypto::session_id(session.get())); cache::saveOlmSession( id_key, std::move(session),