Michael Telatynski
5a8299f1a5
Convert more of js-sdk crypto and fix underscored field accesses
2021-06-23 14:47:25 +01:00
Travis Ralston
f53a32a6b4
Merge branch 'develop' into travis/ts-mtxcli
2021-06-03 18:49:08 -06:00
Hubert Chathi
e22ecc6b6d
Merge branch 'develop' into backup_refactor
2021-06-03 18:43:46 -04:00
Travis Ralston
71dc0bac56
Tests pass 1
2021-06-02 13:42:20 -06:00
Travis Ralston
e1edd84700
Early pass to fix runtime/build errors
2021-06-02 13:42:20 -06:00
Hubert Chathi
07bfa5532e
fix more unit tests
2021-05-26 18:18:30 -04:00
Germain Souquet
5caf05cfa1
Apply new linting rules
2021-05-11 11:25:43 +01:00
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
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
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
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
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
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
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
Hubert Chathi
ca7b49d209
fix incorrect backup key format in SSSS
2020-04-09 00:08:17 -04:00
J. Ryan Stinnett
4a965f5408
Convert secret storage key creation to object
2020-03-31 10:45:02 +01:00
Hubert Chathi
1151bdc6db
initial work in migrating ssss to symmetric
2020-02-27 22:56:34 -05:00
Hubert Chathi
5d52053caa
use symmetric encryption for SSSS
2020-02-24 17:38:53 -05:00
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