Ivan Enderlin
530c268e61
doc(crypto-nodejs): Include the README.md in the generated documentation.
2022-06-07 16:35:22 +02:00
Ivan Enderlin
99dcf84340
chore(crypto-nodejs): Use napi::Result when possible.
2022-06-07 16:28:55 +02:00
Ivan Enderlin
2a76d17bd9
doc(crypto-nodejs): Generate JavaScript/TypeScript documentation.
2022-06-07 16:26:23 +02:00
Ivan Enderlin
15af364c97
Merge branch 'main' into feat-crypto-nodejs-next
2022-06-07 15:31:03 +02:00
Ivan Enderlin
ec7724f393
doc(crypto-nodejs): Improve the README.md.
2022-06-07 15:27:35 +02:00
Ivan Enderlin
1e7d509920
chore(crypto-nodejs): Clean up.
2022-06-07 14:45:20 +02:00
Ivan Enderlin
520758bf1e
test(crypto-nodejs): Finish the OlmMachine test suite.
2022-06-07 14:42:24 +02:00
Benjamin Kampmann
7f49618d35
Merge pull request #729 from gnunicorn/gnunicorn/issue609
...
Ensure all data state stores save is encrypted
2022-06-07 12:41:38 +02:00
Benjamin Kampmann
a308771a7a
fix(sled): Deserialize encrypted TimelineMetadata properly
2022-06-07 12:22:54 +02:00
Benjamin Kampmann
2c4379909c
fix(sled): Wrap [u8] encoding in an explicit type to prevent accidential misuse
2022-06-07 12:22:54 +02:00
Damir Jelić
d4f49ca334
chore: Fix some new clippy warnings
2022-06-07 11:41:29 +02:00
Damir Jelić
c97bb83af9
refactor(base): Remove a bunch of OlmMachine wrapper methods
...
The whole machine is nowadays exposed through the base Client, so no
need to re-expose individual methods that don't add more functionality.
2022-06-07 11:41:29 +02:00
Ivan Enderlin
12c53bb2bc
test(crypto-nodejs): Add more test cases.
2022-06-07 11:05:19 +02:00
Damir Jelić
7fd973c563
refactor(crypto-ffi): Make use of the BackupRecoveryKey type instead of a string
2022-06-07 10:47:19 +02:00
Benjamin Kampmann
f8dae723c3
style: Fix review remarks
2022-06-07 10:20:55 +02:00
Benjamin Kampmann
8ccf78c025
fix(indexeddb): Ensure all values are encrypted (namely filters and timeline metadata) if asked to
2022-06-07 10:20:40 +02:00
Benjamin Kampmann
47bb73cf89
fix(sled): Ensure timeline metadata is also saved encrypted
2022-06-07 10:20:27 +02:00
Benjamin Kampmann
f3d952839e
style: Clean up rustfmt and clippy
2022-06-07 10:19:43 +02:00
Benjamin Kampmann
85ea9279dc
fix(indexeddb): Use random db in plain test for consistency
2022-06-07 10:19:27 +02:00
Benjamin Kampmann
be159356cd
fix(sled): Encrypt custom key and value
2022-06-07 10:19:23 +02:00
Benjamin Kampmann
571b5e61cf
fix(sled): Encrypt media content
2022-06-07 10:19:20 +02:00
Benjamin Kampmann
77af11bcbc
fix(sled): Encrypt saved sync_token
2022-06-07 10:19:20 +02:00
Benjamin Kampmann
335251695a
fix(sled): Encrypt saved filters
2022-06-07 10:19:17 +02:00
Benjamin Kampmann
bf17012d6b
test(base): Add integration store test for saving filters
2022-06-07 10:19:13 +02:00
Benjamin Kampmann
328ebdba9c
fix(sled): Encrypt saved user_ids
2022-06-07 10:19:08 +02:00
Benjamin Kampmann
c359b011fa
refactor(sled): Rename for consistency event -> value
2022-06-07 10:19:04 +02:00
Ivan Enderlin
07fed7f4df
test(crypto-nodejs): Continue to test OlmMachine and add tracing support.
2022-06-06 16:27:32 +02:00
Ivan Enderlin
0ed74d8c31
test(crypto-nodejs): Test OlmMachine.receiveSyncChanges, .outgoingRequests and .markRequestAsSent.
2022-06-06 12:09:37 +02:00
Ivan Enderlin
35d7cab330
feat(crypto-nodejs): Rename requests request_id to id + add type.
2022-06-06 12:08:58 +02:00
Ivan Enderlin
407e27d176
feat(crypto-nodejs): Make changed and left optional in DeviceLists constructor.
2022-06-06 10:27:32 +02:00
Damir Jelić
0f758a643c
refactor(crypto): Make the boolean parameter for the backup verification clearer
2022-06-03 16:29:17 +02:00
Damir Jelić
fd2ae1ed8f
docs(crypto): Improve some backup verfication docs
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-06-03 16:29:17 +02:00
Damir Jelić
2b13c0832f
refactor(crypto): Introduce a struct for the backup info
2022-06-03 16:29:17 +02:00
Damir Jelić
b3fbd15270
feat(crypto): Improve the API to verify backups
...
This API change allows us to inspect why a backup is considered to be
trusted instead of just returning a boolean telling us if it's trusted
or not.
2022-06-03 16:29:17 +02:00
Amanda Graven
4e3e393596
refactor(appservice): Better virtual client sync
...
Store the membership state of clients in the appservice's namespace, and
construct sync events based on that information
2022-06-03 15:03:31 +02:00
Jonas Platte
7f81e7c61b
chore: Optimize quote even in debug mode
2022-06-03 14:48:48 +02:00
Ivan Enderlin
a75ae16b79
test(crypto-nodejs): Add more test suites.
2022-06-02 15:58:30 +02:00
Ivan Enderlin
9ebc61ad0f
test(crypto-nodejs): Adding more test suites.
2022-06-02 15:24:22 +02:00
Ivan Enderlin
0d66480cd6
fix(crypto-nodejs): OlmMachine.new effectively raises an error.
...
Returning an `napi::Error` doesn't raise it. We must return a
`Result<_, napi::Error>` to ensure `napi` will raise the error as
expected.
2022-06-02 15:23:25 +02:00
Ivan Enderlin
02802e9088
feat(crypto-nodejs): EncryptionSettings.rotation_period and .…_period_messages are now BigInt.
2022-06-02 13:59:00 +02:00
Ivan Enderlin
1a6adc6d41
chore(crypto-nodejs): Ignore package-lock.json for now.
2022-06-02 11:10:55 +02:00
Ivan Enderlin
6d10d6150c
test(crypto-nodejs): Add some test suites.
2022-06-02 11:09:57 +02:00
Damir Jelić
fb1a2f6d94
feat(appservice): Add support for appservice login
...
An appservice can log in by providing a valid appservice token and a user within the appservice’s namespace.
This allows the appservice to acquire a scoped access token for a single user. matrix-appservice-sdk can now take a persisted device id for virtual users. If e2ee is enabled, it will automatically perform an appservice login to create the an E2EE backed session for the virtual user.
2022-06-02 10:36:33 +02:00
Damir Jelić
bdee4e0547
refactor(crypto): Use a result type for invalid signatures
2022-06-02 09:31:37 +02:00
Denis Kasak
42d5eec8b7
docs(crypto): Improve Signature doc comment.
2022-06-02 09:31:37 +02:00
Damir Jelić
e50c1465ea
docs(crypto): Improve some signature verification related docs
...
Co-authored-by: Denis Kasak <dkasak@termina.org.uk >
2022-06-02 09:31:37 +02:00
Damir Jelić
5827cc9a39
refactor(crypto): Use ? instead of nesting closures when searching for a key
...
Co-authored-by: Jonas Platte <jplatte@element.io >
2022-06-02 09:31:36 +02:00
Damir Jelić
c95fd93666
fix(types): Allow Ed25519 signatures to be invalid
...
Since signatures can be uploaded by anyone, unlike one-time keys which
might only be uploaded by the given device for themselves, a Signatures
struct might fail to be deserialized because a signature was maliciously
attached to the object by someone else.
We don't want to fail to deserialize all the signatures just because
someone attached an invalid one. We still would like to have the
signature be deserialized into its proper type if possible so the Raw<T>
pattern was not used.
2022-06-02 09:31:36 +02:00
Damir Jelić
d96fcf7199
refactor(crypto): Return a Signatures struct in the sign method
2022-06-02 09:31:36 +02:00
Damir Jelić
e2348471db
fix(crypto): Make fetching of the first cross signing key more robust
2022-06-02 09:31:36 +02:00