diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-07-07 16:42:03 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-07-07 16:42:03 +0100 |
commit | 3a382aec59937b086c37f039f1b011f253e80e97 (patch) | |
tree | 9c544b2fa307b4920e0f945e05cff3251db524e6 /tests | |
parent | 2a873fd4e1d53c45898b27e1c953b551b2cf6023 (diff) |
Encode the account keys as a signed JSON object
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_olm.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/tests/test_olm.cpp b/tests/test_olm.cpp index 74d19e7..8ea2462 100644 --- a/tests/test_olm.cpp +++ b/tests/test_olm.cpp @@ -75,9 +75,11 @@ std::uint8_t b_random[::olm_create_account_random_length(b_account)]; mock_random_b(b_random, sizeof(b_random)); ::olm_create_account(b_account, b_random, sizeof(b_random)); -std::uint8_t b_id_keys[::olm_account_identity_keys_length(b_account)]; +std::uint8_t b_id_keys[::olm_account_identity_keys_length(b_account, 0, 0, 0, 0)]; std::uint8_t b_ot_keys[::olm_account_one_time_keys_length(b_account)]; -::olm_account_identity_keys(b_account, b_id_keys, sizeof(b_id_keys)); +::olm_account_identity_keys( + b_account, nullptr, 0, nullptr, 0, 0, 0, b_id_keys, sizeof(b_id_keys) +); ::olm_account_one_time_keys(b_account, b_ot_keys, sizeof(b_ot_keys)); std::uint8_t a_session_buffer[::olm_session_size()]; @@ -86,7 +88,7 @@ std::uint8_t a_rand[::olm_create_outbound_session_random_length(a_session)]; mock_random_a(a_rand, sizeof(a_rand)); assert_not_equals(std::size_t(-1), ::olm_create_outbound_session( a_session, a_account, - b_id_keys + 14, 43, + b_id_keys + 88, 43, ::atol((char *)(b_ot_keys + 62)), b_ot_keys + 74, 43, a_rand, sizeof(a_rand) )); @@ -177,9 +179,11 @@ std::uint8_t b_random[::olm_create_account_random_length(b_account)]; mock_random_b(b_random, sizeof(b_random)); ::olm_create_account(b_account, b_random, sizeof(b_random)); -std::uint8_t b_id_keys[::olm_account_identity_keys_length(b_account)]; +std::uint8_t b_id_keys[::olm_account_identity_keys_length(b_account, 0, 0, 0, 0)]; std::uint8_t b_ot_keys[::olm_account_one_time_keys_length(b_account)]; -::olm_account_identity_keys(b_account, b_id_keys, sizeof(b_id_keys)); +::olm_account_identity_keys( + b_account, nullptr, 0, nullptr, 0, 0, 0, b_id_keys, sizeof(b_id_keys) +); ::olm_account_one_time_keys(b_account, b_ot_keys, sizeof(b_ot_keys)); std::uint8_t a_session_buffer[::olm_session_size()]; @@ -188,7 +192,7 @@ std::uint8_t a_rand[::olm_create_outbound_session_random_length(a_session)]; mock_random_a(a_rand, sizeof(a_rand)); assert_not_equals(std::size_t(-1), ::olm_create_outbound_session( a_session, a_account, - b_id_keys + 14, 43, + b_id_keys + 88, 43, ::atol((char *)(b_ot_keys + 62)), b_ot_keys + 74, 43, a_rand, sizeof(a_rand) )); |