diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-07 23:54:35 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-08-07 23:54:35 +0200 |
commit | b73bd2859ca9c3209f6da9c29346b95548b6b8c9 (patch) | |
tree | 1ebcab718c40c77b2ca546fca96e24739197a173 /src/Olm.h | |
parent | Show encryption errors in qml and add request keys button (diff) | |
download | nheko-b73bd2859ca9c3209f6da9c29346b95548b6b8c9.tar.xz |
Protect against replay attacks
Diffstat (limited to '')
-rw-r--r-- | src/Olm.h | 4 |
1 files changed, 3 insertions, 1 deletions
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<mtx::events::msg::Encrypted> &event); + const mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> &event, + bool dont_write_db = false); crypto::Trust calculate_trust(const std::string &user_id, const std::string &curve25519); |