aboutsummaryrefslogtreecommitdiff
path: root/python/olm/__main__.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2016-10-20 09:58:55 +0100
committerMark Haines <mjark@negativecurvature.net>2016-10-20 09:58:55 +0100
commit653790eacbf7dcf94cbf181657cdb0c30c890c3f (patch)
tree6cf8ca49bff13c01d18c15cd8e1a5e53c1cf9167 /python/olm/__main__.py
parent6ea9fb450ec1ef10b32d65ceb00a6042b927a95c (diff)
Return the message index when decrypting group messages.
Applications can use the index to detect replays of the same message.
Diffstat (limited to 'python/olm/__main__.py')
-rwxr-xr-xpython/olm/__main__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/olm/__main__.py b/python/olm/__main__.py
index cf9158d..eb76301 100755
--- a/python/olm/__main__.py
+++ b/python/olm/__main__.py
@@ -328,7 +328,7 @@ def do_group_decrypt(args):
session = InboundGroupSession()
session.unpickle(args.key, read_base64_file(args.session_file))
message = args.message_file.read()
- plaintext = session.decrypt(message)
+ plaintext, message_index = session.decrypt(message)
with open(args.session_file, "wb") as f:
f.write(session.pickle(args.key))
args.plaintext_file.write(plaintext)