diff options
author | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 00:04:58 +0100 |
---|---|---|
committer | pedroGitt <pedro.contreiras@amdocs.com> | 2016-11-23 00:04:58 +0100 |
commit | 7a6897642baa8fc5d9d9f14c80fc4f201cfe2173 (patch) | |
tree | 9325a7d7d3ac40747f49af22378dcf9bc5c0dd0b /src/inbound_group_session.c | |
parent | c725a561a283f508e68516ded86d141214f5ea06 (diff) | |
parent | f6c05be8c5d35e725a8a2ed5ad661398ac9f8cd2 (diff) |
Merge remote-tracking branch 'origin/master' into pedroc/android_e2e_dev
Diffstat (limited to 'src/inbound_group_session.c')
-rw-r--r-- | src/inbound_group_session.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/inbound_group_session.c b/src/inbound_group_session.c index bf00008..a54e55f 100644 --- a/src/inbound_group_session.c +++ b/src/inbound_group_session.c @@ -263,7 +263,8 @@ size_t olm_group_decrypt_max_plaintext_length( static size_t _decrypt( OlmInboundGroupSession *session, uint8_t * message, size_t message_length, - uint8_t * plaintext, size_t max_plaintext_length + uint8_t * plaintext, size_t max_plaintext_length, + uint32_t * message_index ) { struct _OlmDecodeGroupMessageResults decoded_results; size_t max_length, r; @@ -286,6 +287,10 @@ static size_t _decrypt( return (size_t)-1; } + if (message_index != NULL) { + *message_index = decoded_results.message_index; + } + /* verify the signature. We could do this before decoding the message, but * we allow for the possibility of future protocol versions which use a * different signing mechanism; we would rather throw "BAD_MESSAGE_VERSION" @@ -349,7 +354,8 @@ static size_t _decrypt( size_t olm_group_decrypt( OlmInboundGroupSession *session, uint8_t * message, size_t message_length, - uint8_t * plaintext, size_t max_plaintext_length + uint8_t * plaintext, size_t max_plaintext_length, + uint32_t * message_index ) { size_t raw_message_length; @@ -361,7 +367,8 @@ size_t olm_group_decrypt( return _decrypt( session, message, raw_message_length, - plaintext, max_plaintext_length + plaintext, max_plaintext_length, + message_index ); } |