Damir Jelić
b311a31c9e
matrix-sdk: Bump our tokio and reqwest versions.
2021-01-05 21:39:52 +01:00
Damir Jelić
4f2cad8f62
matrix-sdk: Bump our versions
2021-01-05 11:23:18 +01:00
Damir Jelić
8924865c9c
crypto: Fix a couple of new clippy warnings.
2021-01-04 17:39:40 +01:00
Damir Jelić
60950044f2
matrix-sdk: Bump our deps.
2021-01-04 17:22:09 +01:00
Damir Jelić
4c6c1d2107
matrix-sdk: Get rid of the common macros crate
...
This crate was used to support different trait bounds on WASM vs other
targets, since we only define async traits in a couple of places having
a whole crate to support this feels a bit excessive.
This patch defines a target specific super trait instead, this lowers
the compile time a couple of seconds.
2021-01-04 16:34:14 +01:00
Damir Jelić
2e3b6fba7d
common: Use the re-exported versions of js_int and assign
2021-01-04 15:29:49 +01:00
Damir Jelić
de51291166
common: Remove the direct dep to js_int now that Ruma re-exports it
2021-01-04 15:13:48 +01:00
Damir Jelić
d84a852ae9
matrix-sdk: Bump ruma to a released version.
2021-01-04 14:06:07 +01:00
Damir Jelić
9245b2a89a
crypto: Properly canonicalize the json when verifying signatures as well.
2020-12-22 15:45:42 +01:00
Damir Jelić
d39e3141fc
crypto: Use CanonicalJsonValue for all the signature calculations.
2020-12-22 14:12:57 +01:00
Alex Black
d4327d4cfc
EventEmitter: add VoIP event support (m.call.* event types)
...
Signed-off-by: Alex Black <blacka101@gmail.com>
2020-12-17 00:19:37 +11:00
Damir Jelić
d9e5a17ab0
crypto: Use a native Rust sha2 implementation to calculate the commitment
2020-12-08 16:21:29 +01:00
Damir Jelić
b5c61af472
crypto: Move the base64 helpers into a common module.
2020-12-08 16:21:29 +01:00
Damir Jelić
fd705b7d5e
crypto: Canonicalize the start event content before calculating the commitment
...
This fixes : #117 .
2020-12-08 16:02:51 +01:00
Damir Jelić
8e53982bcd
Merge branch 'master' into crypto-improvements
2020-12-08 15:06:14 +01:00
Damir Jelić
ca4e738fff
Merge branch 'master' into user-avatar-ci
2020-12-08 14:43:46 +01:00
Damir Jelić
594e9b9e2d
README: Swap out the CI badge.
2020-12-08 14:31:14 +01:00
Damir Jelić
15b87e9dc1
CI: Restrict code coverage to the master branch.
2020-12-08 14:30:49 +01:00
Damir Jelić
fa3583234c
CI: Fix the coverage yml.
2020-12-08 14:09:51 +01:00
Damir Jelić
9679db6ddc
CI: Enable code coverage again.
2020-12-08 14:05:25 +01:00
Damir Jelić
fdf48d1f30
CI: Rename the workflow file.
2020-12-08 13:58:26 +01:00
Damir Jelić
40d13d9b59
cyrpto: Another timing based test that only works on Linux.
2020-12-08 13:37:55 +01:00
Damir Jelić
4ab6ae7f30
crypto: Fix an os_target definition.
2020-12-08 13:15:19 +01:00
Damir Jelić
c8dd6bfd26
crypto: Scope the imports for the unwedging test into the test.
2020-12-08 12:56:16 +01:00
Damir Jelić
0a76f75c22
Revert "CI: Use the cargo-clippy workflow."
...
This reverts commit 795c1225dd
.
2020-12-08 12:45:16 +01:00
Damir Jelić
795c1225dd
CI: Use the cargo-clippy workflow.
2020-12-08 12:37:39 +01:00
Damir Jelić
b982d36303
crypto: Run the time sensitive tests only on linux.
2020-12-08 12:34:59 +01:00
Damir Jelić
a80aa4c2ad
base: Fix some lint issues.
2020-12-08 12:11:55 +01:00
Damir Jelić
27d9cf04de
base: Remove a flaky state store test.
...
The state store is undergoing a rewrite and this test fails more often
than i would like making our CI seem flaky.
Remove the test since it's going to become obsolete anyways.
2020-12-08 11:52:21 +01:00
Damir Jelić
e4779163b8
CI: Run the tests on the CI.
2020-12-08 11:36:01 +01:00
Damir Jelić
2cc899338a
CI: Split out the fmt and clippy runs into two jobs.
2020-12-08 11:21:09 +01:00
Amanda Graven
8dc56ec332
Add methods for setting, getting and uploading avatar
2020-12-08 11:18:00 +01:00
Damir Jelić
1d5ee22dd2
CI: Name our lint stages.
2020-12-08 11:08:41 +01:00
Damir Jelić
59917f45e3
matrix-sdk: Fix a clippy lint.
2020-12-08 11:01:20 +01:00
Damir Jelić
35247fac2a
crypto: Fix a lint issue.
2020-12-08 10:50:58 +01:00
Damir Jelić
e24fb8b471
CI: Fix the cargo fmt invocation.
2020-12-08 10:44:19 +01:00
Damir Jelić
795900cf39
CI: Add a lint github workflow.
2020-12-08 10:42:05 +01:00
Amanda Graven
bca7f41ca9
Fix error in example
2020-12-07 13:14:23 +01:00
Amanda Graven
7f503eb71c
Add examples, remove user from method names
2020-12-07 12:59:10 +01:00
Amanda Graven
a26dc3179a
Add methods for getting and setting display name
2020-12-07 11:17:26 +01:00
Damir Jelić
aa1a64628f
crypto: Remove a bunch of unneeded whitespace in a log line.
2020-12-05 14:59:40 +01:00
Damir Jelić
0e66640b9f
crypto: Log both user id versions when the device keys mismatch.
2020-12-05 14:59:40 +01:00
Damir Jelić
3f41e5071b
crypto: Preserve the relationship info while decrypting events.
2020-12-05 14:59:40 +01:00
Damir Jelić
9eb17e757c
matrix-sdk: Update ruma.
2020-12-05 14:59:40 +01:00
Damir Jelić
804bd221b2
crypto: Improve key imports.
...
This patch changes so key imports load all existing sessions at once
instead loading a single session for each session we are importing. It
removes the need to lock the session when we check the first known index
and exposes the total number of sessions the key export contained.
2020-12-02 11:12:46 +01:00
Damir Jelić
e20b1efae9
crypto: Store private identities and accounts with the Changes struct as well.
2020-12-01 17:14:32 +01:00
Damir Jelić
e65915e159
Merge branch 'crypto-improvements'
2020-12-01 15:10:58 +01:00
Damir Jelić
4800e80492
matrix-sdk: Remove an unused import.
2020-12-01 15:08:53 +01:00
Damir Jelić
5d0ff961b2
crypto: Check the Olm message hash if we fail to decrypt an Olm message.
...
Wether by accident (the next_batch token doesn't get stored properly) or
by malicious intent (the server replays a message) an Olm encrypted to-device
message may appear multiple times.
This is usually fine since nothing bad happens, we don't decrypt the message
and the message gets thrown away.
Since the introduction of Olm session unwedging an undecryptable message
leads to the creation of a new fresh Olm session. To avoid this we
remember which Olm messages we already decrypted so they don't trigger
an unwedging dance.
2020-12-01 14:50:04 +01:00
Damir Jelić
270350cd34
crypto: Save the olm message hash.
2020-12-01 14:38:03 +01:00