Ivan Enderlin
da8699fe40
feat(crypto): DeviceLists.new expects Array<UserId>s now.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
16b5eebe23
feat(crypto): Implement a hacky downcast function.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
8161360852
feat(crypto): Add toString methods on identifier objects.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
f01cfe42b4
feat(crypto): Implement EncryptionSettings.new with default values.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
a024c9b268
docs(crypto): Add missing documentation.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
c20349f46f
feat(crypto): Implement OlmMachine.share_group_session.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
e9d37d7c4e
docs(crypto): Add missing docs.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
8b94aed27f
fix(crypto): Use txn_id for transaction_id.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
dc5b15e799
fix(crypto): OutgoingRequest::ToDeviceRequest was not correctly mapped.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
30e9189f7b
fix(crypto): Use JavaScript naming convention for OlmMachine.invalidate_group_session.
2022-05-31 08:36:37 +02:00
Ivan Enderlin
b6a5d4962b
Merge branch 'main' into feat-crypto-wasm
2022-05-31 08:36:30 +02:00
Ivan Enderlin
ee713f928f
feat(crypto): Implement OlmMachine.encrypt and .invalidate_group_session.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
444ff9936b
feat(crypto): Implement RoomId.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
2451815226
feat(crypto): Implement *PublicKey.to_base64 and .length.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
86c6e601bd
chore(crypto): Refactor the code with TryFrom on a tuple.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
9f159ff5a4
feat(crypto): Implement OlmMachine.mark_request_as_sent.
...
To implement this method, a new `responses::OwnedResponse`
intermediate type was needed. In addition to that, the `http` crate is
now required when the `js` feature is enabled.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
056f34883f
feat(crypto): Implement OlmMachine.trackedUsers.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
2d15f758da
feat(crypto): Use JavaScript naming style for methods.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
acd5de3cf3
feat(crypto): Implement ServerName, and add UserId.serverName.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
f0bb35a96c
feat(crypto): Add changed and left to the constructor of DeviceLists.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
1d38e54739
feat(crypto): Return a JsError rather than a String.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
08665dcd1c
feat(crypto): Implement our own future_to_promise helper to simplify code.
...
`wasm_bindgen_future::future_to_promise` expects a `Future<Output =
Result<JsValue, JsValue>>`. We reimplement this function by expecting
a `Future<Output = Result<T, anyhow::Error>>` where `T:
Into<JsValue>`. That way, we apply the type conversions to `JsValue`
inside this helper rather than in the call site. Additionally, all
errors are managed automatically without having to deal with `JsError`
or `JsValue`. It makes the code simpler to read and easier to write
from my point of view.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
569adb7ceb
feat(crypto) Implement OlmMachine.identity_keys.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
fd4dff79d4
feat(crypto) Implement OlmMachine.user_id, .device_id and .display_name.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
fdb9fe21c6
feat(crypto) Remove existing unwrap code.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
7e5eec82c5
feat(crypto) Implement OlmMachine.outgoing_requests.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
901715bcf3
chore(crypto) Generate a smaller Wasm module.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
3aa46fa746
feat(crypto) Implement OlmMachine.receive_sync_changes & friends.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
3318789a8b
feat(crypto) Implement UserId, DeviceId and OlmMachine in Wasm for JS.
2022-05-31 08:35:09 +02:00
Ivan Enderlin
0fe0910fea
feat(crypto) Reduce Wasm binary size by enabling LTO.
2022-05-31 08:35:09 +02:00
Damir Jelić
a11633381b
Merge branch 'poljar/borrow-signature-check-fix'
2022-05-30 12:54:35 +02:00
Benjamin Kampmann
2ff6497604
Merge pull request #715 from gnunicorn/gnunicorn/issue694
...
docs: configure docs.rs build to contain more features
2022-05-27 22:24:02 +02:00
Damir Jelić
7f87abf408
refactor(crypto): Simplify the signature checking method
2022-05-27 21:29:58 +02:00
Damir Jelić
dd49a8bd43
fix(crypto): Don't require mutable borrows when signature checking
2022-05-27 21:28:35 +02:00
Damir Jelić
f8c3a1d03b
Merge branch 'poljar/signatures-struct'
2022-05-27 20:58:45 +02:00
Damir Jelić
808c4c6f3c
chore(crypto): Remove some indentation levels in the types module
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-05-27 20:55:17 +02:00
Damir Jelić
a14549d5cc
fix(crypto): Don't unwrap when converting to canonical json
2022-05-27 20:55:17 +02:00
Damir Jelić
9b5b4ab2b2
refactor(crypto): Use the Signatures struct for the CrossSigningKey
2022-05-27 20:55:17 +02:00
Damir Jelić
5756057719
refactor(crypto): Use the new Signatures struct for the DeviceKeys
2022-05-27 20:55:17 +02:00
Damir Jelić
c5ef3e7c94
refactor(crypto): Turn the SignedKeySignatures into a struct
2022-05-27 20:55:17 +02:00
Damir Jelić
fa7c1b60f6
feat(sdk): Replace some Mutex usage with a OnceCell
...
This makes some simpler getter methods non-async.
2022-05-27 16:37:51 +02:00
Julian Sparber
39b1fff218
Merge remote-tracking branch 'origin/main' into user_once_cell_for_session
2022-05-27 15:53:22 +02:00
Benjamin Kampmann
c6df6b421c
docs: fix target and feature-list for docsrs
2022-05-27 13:04:07 +02:00
Benjamin Kampmann
f9b4fd2d12
docs: configure docs.rs build to contain more features
2022-05-27 10:44:16 +02:00
Damir Jelić
e5390e18de
refactor(crypto): Introduce a SignJson trait
...
This patch collects our json signing logic into a single place.
2022-05-27 10:39:12 +02:00
Brandon Lau
28cd0c19e9
fix(crypto-ffi): make crypto-ffi generate a static library for iOS clients
2022-05-27 10:38:21 +02:00
Damir Jelić
15ebc95cd0
chore(qrcode): Add more missing Eq implementations
2022-05-25 13:52:22 +02:00
Damir Jelić
39e12a86ca
chore(crypto): Bump vodozemac
2022-05-25 13:49:00 +02:00
依云
ec9ec2567f
feat: Add .resolve_room_alias() method to the Client
2022-05-24 08:43:02 +02:00
Damir Jelić
fa9c91fb0e
fix(crypto-ffi): Add support to encrypt custom events
2022-05-23 19:37:04 +02:00