aboutsummaryrefslogtreecommitdiff
path: root/src/axolotl.cpp
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-06-22 11:02:42 +0100
committerMark Haines <mark.haines@matrix.org>2015-06-22 11:02:42 +0100
commit408530adf9ec0fd7aa8a201103262eebfc9cfc3e (patch)
tree7eeeab21e409727b2d7b2b6b05332046081e8a01 /src/axolotl.cpp
parentfb980849c4ffc99bca7a2dd5a347e9f0b4b99469 (diff)
Add API for removing used one time keys
Diffstat (limited to 'src/axolotl.cpp')
-rw-r--r--src/axolotl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/axolotl.cpp b/src/axolotl.cpp
index e835c9b..c195a7c 100644
--- a/src/axolotl.cpp
+++ b/src/axolotl.cpp
@@ -468,6 +468,20 @@ size_t axolotl_matches_inbound_session(
}
+size_t axolotl_remove_one_time_keys(
+ AxolotlAccount * account,
+ AxolotlSession * session
+) {
+ size_t result = from_c(account)->remove_key(
+ from_c(session)->bob_one_time_key_id
+ );
+ if (result == std::size_t(-1)) {
+ from_c(account)->last_error = axolotl::ErrorCode::BAD_MESSAGE_KEY_ID;
+ }
+ return result;
+}
+
+
size_t axolotl_encrypt_message_type(
AxolotlSession * session
) {