Damir Jelić
a49a7fe1f9
fix(crypto): Clear the master key signatures when we verify our own user
2021-11-22 18:00:52 +01:00
Damir Jelić
fa42373cf8
Merge branch 'client-arc'
2021-11-22 16:27:27 +01:00
Damir Jelić
a8c36b4041
Merge branch 'fix-session-doc-example'
2021-11-22 16:24:31 +01:00
Damir Jelić
b91773a276
Merge branch 'store-upgrade-fix'
2021-11-22 16:23:53 +01:00
Damir Jelić
fbc01f015d
fix(sdk): Use the correct restore method in an example
2021-11-22 15:44:35 +01:00
Damir Jelić
5d26e36e1f
fix(crypto): Make sure we store the store version using the right key
2021-11-22 15:28:21 +01:00
Damir Jelić
c4f60dd163
fix(crypto): Only upload our own signature when verifying user identities
2021-11-22 12:33:18 +01:00
Jonas Platte
b4220bd824
Reduce the size of Client
...
… by moving all of its fields into an inner reference-counted type
rather than using reference counting for all fields individually.
Some fields are still refcounted individually and thus go through an
extra layer of indirection, but the size and clone simplification should
still make this change worthwhile.
2021-11-20 02:01:07 +01:00
Jonas Platte
73c5bfed28
Switch from futures-locks to async-lock
2021-11-20 02:01:07 +01:00
Jonas Platte
2456beaf88
Make Result alias more flexible
2021-11-20 00:00:08 +01:00
Jonas Platte
cc6f97bee9
Fix missing word
2021-11-20 00:00:08 +01:00
Jonas Platte
8f47e6ffe9
Remove copy-pasted module documentation
...
It doesn't seem right that both room and room_member have the same
description. Also room_member is private and doesn't usually show up in
docs.
2021-11-20 00:00:08 +01:00
Jonas Platte
544b24b0ef
Move some code out of client.rs
...
It is by far the biggest module of the matrix-sdk crate.
2021-11-20 00:00:08 +01:00
Jonas Platte
1e13e06e34
Make event-handling related Client fields private
2021-11-19 20:48:27 +01:00
Damir Jelić
5a4aa71f6a
feat(base): Add a From login response implementation for the Session
2021-11-19 09:41:48 +01:00
Damir Jelić
6606703001
docs(base): Remove anyhow from an example since it isn't used
2021-11-19 09:12:51 +01:00
Andy Balaam
0c35d8890d
Improve Session docs example
2021-11-18 17:14:34 +00:00
Andy Balaam
7d7bd97812
Document how to create a Session
2021-11-18 14:18:16 +00:00
Andy Balaam
f5ba9a5eea
Update BackupMachine documentaton to refer to enable_backup_v1
2021-11-18 10:28:03 +00:00
Damir Jelić
2e4d5f25cb
feat(crypto): Add a method to get the algorithm of the public backup key
2021-11-17 13:02:23 +01:00
Damir Jelić
534e50da57
fix(crypto): Rename the enable_backup method so we can add a v2 one
2021-11-17 13:02:23 +01:00
Damir Jelić
1ffa06884a
fix(crypto): Rename the decrypt method on the RecoveryKey struct
...
The new backup algorithm reuses the same key but uses a different
construct to encrypt/decrypt room keys. This reflects that our decrypt
method uses the v1 algorithm.
2021-11-17 13:02:23 +01:00
Damir Jelić
670e212d9b
docs(crypto): Fill out the docs for the backup related types
2021-11-17 13:02:23 +01:00
Damir Jelić
6fc703b4a3
fix(crypto): Fix a bunch of clippy warnings
2021-11-17 13:02:23 +01:00
Damir Jelić
33b7062515
fix(crypto): Fix a bunch of typos
2021-11-17 13:01:58 +01:00
Damir Jelić
a7bbeb7ef5
improvement(crypto): Add tests for the recovery key
2021-11-17 13:01:58 +01:00
Damir Jelić
34ec4ac3c9
improvement(crypto): Add tests for the backup machine
2021-11-17 13:01:58 +01:00
Damir Jelić
3f227de023
fix(crypto): Fix the backed up room key count in the memory store
2021-11-17 13:01:58 +01:00
Damir Jelić
a417aa23fa
fix(crypto): Load the recovery key from the sled store
2021-11-17 13:01:58 +01:00
Damir Jelić
f8fdfd1613
fix(crypto): Add a proper exception when creating the Pk decryption object
2021-11-17 13:01:58 +01:00
Damir Jelić
1fdd560ff0
fix(crypto): Remove a unneeded clippy attribute
2021-11-17 13:01:58 +01:00
Damir Jelić
878969a5c4
docs(crypto): Add some docs for the backup related types
2021-11-17 13:01:58 +01:00
Damir Jelić
c6d073ebd7
fix(crypto): Remove some dead code
2021-11-17 13:01:58 +01:00
Damir Jelić
2b5ae869cd
feat(crypto): Gossip the backup recovery key if requested
2021-11-17 13:01:58 +01:00
Damir Jelić
2db52eed7c
feat(crypto): Request the recovery key when we request secrets
2021-11-17 13:01:58 +01:00
Damir Jelić
656edce75a
improvement(crypto): Make the backup logging prettier
2021-11-17 13:01:58 +01:00
Damir Jelić
4c021dea5e
fix(crypto): Correctly reset the backup state of room keys
2021-11-17 13:01:58 +01:00
Damir Jelić
bbd76dafa0
fix(crypto): Fix a bunch of clippy warnings
2021-11-17 13:01:58 +01:00
Damir Jelić
4f2c91d848
feat(crypto): Add a method to decrypt messages using the recovery key
2021-11-17 13:01:58 +01:00
Damir Jelić
6f5b6900d6
fix(crypto): Flush when we ugprade the DB
2021-11-17 13:01:58 +01:00
Damir Jelić
eddc7bd6af
feat(crypto): Add a method to check the signature of a backup version
2021-11-17 13:01:58 +01:00
Damir Jelić
dfef6370b6
feat(crypto): Add a method to verify uploaded backups
2021-11-17 13:01:58 +01:00
Damir Jelić
b5babdb6c4
fix(crypto): Don't load all room keys when backing up
2021-11-17 13:01:58 +01:00
Damir Jelić
df53eb00ab
fix(crypto): Fix a deadlock when generating the backup request
2021-11-17 13:01:58 +01:00
Damir Jelić
63915171fc
feat(crypto): Add a method to check if backups are enabled
2021-11-17 13:01:58 +01:00
Damir Jelić
4873914d4d
feat(crypto): Initial support for server-side backups of room keys
2021-11-17 13:01:44 +01:00
Damir Jelić
f069387d58
docs(sdk): Add an example to the restore_login method
2021-11-15 16:15:05 +01:00
ftilde
8815c05108
Refactor Joined::send_attachment
...
Instead of manually modifying *EventContent structs, the ruma
constructors *::encrypted and *::plain are used now depending on whether
encryption should be used for the attachment or not.
2021-11-13 01:39:00 +01:00
ftilde
dfc2ed7a33
Prefer MediaType::Encrypted if url and file are present
...
Some clients (including those using matrix-rust-sdk currently) may add
encrypted file info as well as the url to the encrypted blob to the
*EventContent. Interpreting the presence of an url as an indicator of
unencrypted message (like was done before) would result in access to the
encrypted blob in `get_media_content`.
Fixes #406 .
2021-11-13 01:39:00 +01:00
Jonas Platte
38a8253aa8
Turn register_event_handler(_context)? examples into proper doctests
...
Previously, they didn't actually run the methods they were showing the
use of.
2021-11-12 12:39:07 +01:00