J. Ryan Stinnett
e9590e9093
Adjust types and APIs to match React SDK
...
Various small tweaks and alignments to match React SDK as part of TypeScript
conversion.
Part of https://github.com/vector-im/element-web/issues/15350
2020-10-09 17:21:14 +01:00
Hubert Chathi
e05a50528e
make test no longer dependent on emscripten internals
2020-10-06 19:01:01 -04:00
J. Ryan Stinnett
a0317d9587
Fix tests
2020-10-05 14:29:30 +01:00
J. Ryan Stinnett
09bd91a588
Enforce logger module via lint rules
...
This adds lint rules (and fixes various errors) to ensure we use the `logger`
intermediary module, rather than accessing the console directly.
2020-10-01 14:28:24 +01:00
J. Ryan Stinnett
f19d76b08d
Untangle cross-signing and secret storage
...
This untangles cross-signing and secret storage setup into separate path that
can be invoked independently. There is no functional change with this patch, but
instead this just separates one giant monster API into two.
Part of https://github.com/vector-im/element-web/issues/13895
2020-08-27 13:32:54 +01:00
J. Ryan Stinnett
e14f7b63c7
Handle auth errors during cross-signing key upload
...
In order to handle auth errors (such as incorrect passwords), we need to ensure
we only try to upload cross-signing keys from within the auth flow helper
function.
This rearranges things to store that function in the builder to use it when the
actual upload happens.
2020-08-19 11:44:41 +01:00
J. Ryan Stinnett
098cd1b8d4
Request master cross-signing private key during verification
...
This change adds a request for the master cross-signing private key, in case the
other device is willing to share it.
Part of https://github.com/vector-im/element-web/issues/13896
2020-08-06 16:43:56 +01:00
J. Ryan Stinnett
9d1c7136cc
Store master cross-signing private key in local cache
...
We now want to store all private keys in the local cache, including the master
key if available.
Part of https://github.com/vector-im/element-web/issues/13896
2020-08-06 16:39:56 +01:00
Hubert Chathi
69dc518c2c
Merge pull request #1406 from matrix-org/uhoreg/distrust_backup
...
Don't trust keys megolm received from backup for verifying the sender
2020-06-23 15:37:27 -04:00
Bruno Windels
f62049559c
make authUploadDeviceSigningKeys required, as default is only used by tests
...
and make tests pass {} instead of undefined for authDict as otherwise
we'll enter in the "obtain flows" mode and not add the keys to the builder
2020-06-18 15:06:56 +02:00
Bruno Windels
75fe596e24
fix tests
2020-06-17 15:36:24 +02:00
Hubert Chathi
bc97e7a5ea
don't trust keys megolm received from backup for verifying the sender
2020-06-15 17:47:25 -04:00
Bruno Windels
6dedae2e4d
Revert "remove key backup format migration"
...
This reverts commit 8d81240c58 .
2020-06-05 11:23:04 +02:00
Bruno Windels
d32131b2b8
Revert "lint"
...
This reverts commit 9fe0e1e85f .
2020-06-05 11:20:23 +02:00
Michael Telatynski
a987a31667
Merge pull request #1388 from matrix-org/dbkr/timeouts
...
Fix verification request timeouts to match spec
2020-06-03 10:41:15 +01:00
Michael Telatynski
b83aa54661
Test the verification request timeouts of 10m and 2m
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2020-05-29 14:49:35 +01:00
Hubert Chathi
991f590056
another unit fix test
2020-05-27 23:32:23 -04:00
Hubert Chathi
0e6758ccbc
more unit test fixes
2020-05-27 23:21:15 -04:00
Hubert Chathi
1d9c6520e5
fix unit tests
2020-05-27 20:02:40 -04:00
Bruno Windels
3cd562fa96
Merge pull request #1375 from matrix-org/bwindels/remove-keybackup-format-migration
...
Remove key backup format migration
2020-05-20 08:05:28 +00:00
Bruno Windels
9fe0e1e85f
lint
2020-05-15 13:44:10 +02:00
Bruno Windels
8d81240c58
remove key backup format migration
2020-05-15 12:37:41 +02:00
Hubert Chathi
bdadcd4532
support new key agreement method for SAS
2020-05-14 16:14:45 -04:00
Bruno Windels
91556d5bcd
fix lint
2020-05-13 10:38:03 +02:00
Bruno Windels
039abe1f75
remove tests for upgrade path
2020-05-12 14:53:50 +02:00
Hubert Chathi
e087bce61a
Merge pull request #1311 from matrix-org/uhoreg/fix_backup_key_format
...
Fix incorrect backup key format in SSSS
2020-04-13 17:38:45 -04:00
Hubert Chathi
d2f24c3e87
cut long line to appease lint
2020-04-13 17:03:17 -04:00
Hubert Chathi
5d606bba66
add test for passthrough on backups
2020-04-13 16:54:02 -04:00
Hubert Chathi
864fe459b7
improve readability of tests
2020-04-13 16:27:46 -04:00
Bruno Windels
97cf4bff1f
fix tests
2020-04-09 18:21:20 +02:00
Hubert Chathi
ca7b49d209
fix incorrect backup key format in SSSS
2020-04-09 00:08:17 -04:00
Zoe
c6d32ea2b0
Expose function to force-reset outgoing room key requests
2020-04-02 16:25:50 +01:00
J. Ryan Stinnett
4a965f5408
Convert secret storage key creation to object
2020-03-31 10:45:02 +01:00
David Baker
f57c25ec27
Make test pass again
2020-03-27 15:13:46 +00:00
David Baker
794429b68b
Request the key backup key & restore backup
...
After a successful verification with ourselves, request the key
backup key too and restore a key backup if we get it.
Also cache the key backup key when we cache the SSK & USK so we have
it available to share.
Fixes https://github.com/vector-im/riot-web/issues/12704
2020-03-27 14:40:15 +00:00
David Baker
7f5ac072e6
Use requestSecret on the client to request secrets
...
Rather than accessing private method to get the secret storage
object (this was a bit confusing when I grepped for 'requestSecret'
and didn't find anything).
2020-03-26 16:01:35 +00:00
Zoe
02216b15e5
Merge pull request #1281 from matrix-org/foldleft/12704-key-requests
...
Functions to cache session backups key automatically
2020-03-24 15:32:09 +00:00
David Baker
465f9e634e
Merge pull request #1272 from matrix-org/dbkr/symmetric-ssss-migrate
...
Migration to symmetric SSSS
2020-03-24 13:12:17 +00:00
David Baker
d303fd0c7c
Fix test
2020-03-23 14:53:55 +00:00
Zoe
7053cf0182
Functions to cache session backups key automatically
2020-03-23 14:24:35 +00:00
Zoe
6701fdd486
Rename ssss cache functions to be more general
2020-03-20 10:18:06 +00:00
Zoe
78d9111646
Add a store for backup keys
2020-03-19 15:30:28 +00:00
David Baker
8120041ba7
Merge branch 'symmetric-ssss-migrate' of git://github.com/uhoreg/matrix-js-sdk into uhoreg-symmetric-ssss-migrate
2020-03-17 13:11:01 +00:00
Hubert Chathi
04387e78cc
some cleanups
2020-03-10 15:56:33 -04:00
Hubert Chathi
98d955ef1f
refactor megolm encryption to improve perceived speed
...
- allow applications to pre-send decryption keys before the message is sent
- establish new olm sessions with a shorter timeout first, and then re-try in
the background with a longer timeout without blocking message sending
2020-03-09 18:38:18 -04:00
Bruno Windels
4b9bc67cb6
remove crypto.verification.start event
...
as it is not used anymore by the react-sdk
2020-03-06 16:48:44 +01:00
Zoe
936ef4116b
For self-verifications, also request keys from the other device ( #1245 )
...
* For self-verifications, also request keys from the other device
* removed some XXX's so the editor doesn't think it's three issues
* add methods to access key cache callbacks
2020-03-06 09:56:56 +00:00
Zoe
c54922dba3
Fixed up tests to match new way that crypto stores are created
2020-03-02 12:51:47 +00:00
Zoe
656694ee00
proper spacing for test output text
2020-03-02 09:45:55 +00:00
Zoe
67fe4e1460
lint & only cache valid keys
2020-02-28 11:04:28 +00:00