From b73bd2859ca9c3209f6da9c29346b95548b6b8c9 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 7 Aug 2021 23:54:35 +0200 Subject: Protect against replay attacks --- src/Olm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Olm.h') diff --git a/src/Olm.h b/src/Olm.h index ac1a1617..ab86ca00 100644 --- a/src/Olm.h +++ b/src/Olm.h @@ -81,9 +81,11 @@ encrypt_group_message(const std::string &room_id, const std::string &device_id, nlohmann::json body); +//! Decrypt an event. Use dont_write_db to prevent db writes when already in a write transaction. DecryptionResult decryptEvent(const MegolmSessionIndex &index, - const mtx::events::EncryptedEvent &event); + const mtx::events::EncryptedEvent &event, + bool dont_write_db = false); crypto::Trust calculate_trust(const std::string &user_id, const std::string &curve25519); -- cgit 1.5.1