1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-12 08:42:46 +03:00
Commit Graph

20 Commits

Author SHA1 Message Date
J. Ryan Stinnett
4dbeee8cb3 Ignore downloading for tests 2020-01-27 15:28:36 +00:00
J. Ryan Stinnett
ceb4581f91 Convert secret storage to new account data API
This converts all secret storage to use a newer account data API which uses
cached data in stored when available, but also knows how to ask the homeserver
in case it's invoked during early client startup before the initial sync.

As a consequence, it means most secret storage APIs are now async.

Part of https://github.com/vector-im/riot-web/issues/11901
2020-01-17 17:56:05 +00:00
Travis Ralston
034b8db070 Convert tests to ES6
The earlier commit, d3ce0cb82f, has most of the juicy details on this. In addition to d3ce's changes, we also:
* Use `TestClient` in many integration tests due to subtle behaviour changes in imports when switching to ES6. Namely the behaviour where setting the request function is less reliable in the way we did it, but `TestClient` is very reliable.
* We now use the Olm loader more often to avoid having to maintain so much duplicate code. This makes the imports slightly easier to read.
2019-12-17 15:16:37 -07:00
J. Ryan Stinnett
6942e3467b Rework to hold cross-signing keys in JS SDK as needed 2019-12-10 17:36:35 +00:00
J. Ryan Stinnett
33f5894547 Adjust secret key adding to consume instead of create
This changes `addKey` for secret storage to consume info about a pre-generated
key, rather than creating the key in middle of the method. This eases UI work
that want to have the public and private keys earlier on in the flow.
2019-12-05 16:30:10 +00:00
J. Ryan Stinnett
eeffe208ec Clarify client-level method for adding secret storage keys 2019-12-04 13:45:56 +00:00
J. Ryan Stinnett
9dc61faa6f Add bootstrap option to specify storage key 2019-12-04 11:36:25 +00:00
J. Ryan Stinnett
2173ab3437 Add test for bootstrapping from scratch 2019-12-04 10:59:28 +00:00
Michael Telatynski
057303d57c s/beforeEach/beforeAll/ for Olm.init() and cleanup sas.spec.js 2019-11-25 13:26:10 +00:00
Michael Telatynski
fd58957b06 migrate to jest from mocha+expect+istanbul
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2019-11-20 19:52:50 +00:00
J. Ryan Stinnett
d2ebc58c3c Use secret storage alg const in tests 2019-11-19 11:46:08 +00:00
J. Ryan Stinnett
5f02c4b5ad Namespace default secret storage key methods 2019-11-18 15:19:18 +00:00
David Baker
7218e31a9c Sign & verify SSSS keys 2019-11-13 17:52:24 +00:00
David Baker
1798f3921f Make setDeafultKeyId wait for event 2019-11-13 14:42:08 +00:00
David Baker
26aa3d3ce7 Support default keys 2019-11-13 14:09:40 +00:00
David Baker
c97a87d1f6 Throw if an unknown key is specified
It's probably important that the app knows if a secret isn't going
to be stored under one or more of the keys it thought it was going
to be stored under.

Also add a test to assert it.
2019-11-12 14:07:05 +00:00
David Baker
4c651c15ea Convert secrets events to callbacks too 2019-11-11 20:01:11 +00:00
David Baker
3bec28b2ff make other tests pass 2019-10-28 15:23:58 +00:00
Hubert Chathi
0c714ba4a1 some cleanups 2019-06-05 15:24:03 -04:00
Hubert Chathi
4a9a1b40e9 initial implementation of secret storage and sharing 2019-06-04 15:04:45 -04:00