Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
71bcaa5d
Commit
71bcaa5d
authored
Sep 13, 2016
by
Mark Haines
Browse files
Add a test to check the equivalence of session ids for inbound and outbound sessions
parent
6971f54f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_group_session.cpp
View file @
71bcaa5d
...
...
@@ -133,6 +133,26 @@ int main() {
inbound_session
,
0U
,
session_key
,
session_key_len
);
assert_equals
((
size_t
)
0
,
res
);
/* Check the session ids */
size_t
out_session_id_len
=
olm_outbound_group_session_id_length
(
session
);
uint8_t
out_session_id
[
out_session_id_len
];
assert_equals
(
out_session_id_len
,
olm_outbound_group_session_id
(
session
,
out_session_id
,
out_session_id_len
));
size_t
in_session_id_len
=
olm_inbound_group_session_id_length
(
inbound_session
);
uint8_t
in_session_id
[
in_session_id_len
];
assert_equals
(
in_session_id_len
,
olm_inbound_group_session_id
(
inbound_session
,
in_session_id
,
in_session_id_len
));
assert_equals
(
in_session_id_len
,
out_session_id_len
);
assert_equals
(
out_session_id
,
in_session_id
,
in_session_id_len
);
/* decode the message */
/* olm_group_decrypt_max_plaintext_length destroys the input so we have to
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment