Hubert Chathi
0a82c84006
Merge pull request #882 from uhoreg/fix_mac
...
support both the incorrect and correct MAC methods
2019-04-05 16:45:45 -04:00
Hubert Chathi
01af303d63
fix the selection of the verification methods, and test more things
2019-04-04 14:08:30 -04:00
Hubert Chathi
d1e64d0cfb
support both the incorrect and correct MAC methods
...
also do some refactoring to make it easier to support choices in the other
methods in the future
2019-04-02 23:36:49 -04:00
J. Ryan Stinnett
5a26503da7
Remove sessionStore to cryptoStore migration path
...
The code to migrate from the `sessionStore` to `cryptoStore` originally appeared
in https://github.com/matrix-org/matrix-js-sdk/pull/584 (2017-12-06). At this
point, it seems safe to assume most sessions that need migrating have already
done so. Removing this code simplifies store handling and removes the
`sessionStore` from most places in JS SDK.
2019-03-20 16:56:47 +00:00
Hubert Chathi
79ca235e7c
only create one session at a time per device
2019-03-12 16:04:26 -04:00
Hubert Chathi
999ed1b5b3
Merge pull request #837 from uhoreg/emoji_sas
...
change hex SAS verification to decimal and emoji
2019-02-08 11:44:53 -05:00
Hubert Chathi
fb673b0304
change hex SAS verification to decimal and emoji
2019-02-08 00:56:30 -05:00
David Baker
1a425af3f2
Pass backup info here too
2019-02-07 15:51:51 +00:00
David Baker
9bafed2c26
OK fine, we'll use the session store
2019-02-07 15:33:49 +00:00
Hubert Chathi
244e1b84f7
Initial implementation of key verification
2019-01-23 13:34:25 -05:00
J. Ryan Stinnett
5e3f42ec5a
Use olm-loader in all crypto tests
...
Standardize on importing `olm-loader` rather than pasting the same boilerplate
in different tests. Importantly, `spec/unit/crypto.spec.js` did not include any
loading approach, so it would only find Olm if some other test loaded it first.
Signed-off-by: J. Ryan Stinnett <jryans@gmail.com >
2018-12-13 08:59:57 +00:00
Hubert Chathi
f8ea019f02
fix some assertions in e2e backup unit test
2018-11-29 11:52:19 -05:00
David Baker
abd2ac7168
Rename backup API call in test
2018-11-20 16:34:04 +00:00
David Baker
907cf19f05
Merge remote-tracking branch 'origin/develop' into dbkr/e2e_backups
2018-11-15 16:35:52 +00:00
David Baker
88682e1c3b
Merge pull request #780 from matrix-org/dbkr/olm_session_unwedge
...
Restart broken Olm sessions
2018-11-15 16:34:10 +00:00
David Baker
d74ed508f9
Restart broken Olm sessions
...
* Start a new Olm sessions with a device when we get an undecryptable
message on it.
* Send a dummy message on that sessions such that the other end knows
about it.
* Re-send any outstanding keyshare requests for that device.
Also includes a unit test for megolm that isn't very related but came
out as a result anyway.
Includes https://github.com/matrix-org/matrix-js-sdk/pull/776
Fixes https://github.com/vector-im/riot-web/issues/3822
2018-11-08 19:09:28 +00:00
David Baker
ff4125c11e
Remove unused stuff & comments
2018-11-05 09:39:46 +00:00
David Baker
ec8b3ae515
Lint (and also name the test right)
2018-11-02 12:33:46 +00:00
David Baker
c94382b46c
A unit test for olm
...
Megolm has plenty but none for just the olm layer by itself. I
was playing with getting session re-establishment to work and a
unit test came out.
2018-11-02 12:05:13 +00:00
David Baker
29d92d3e81
Lint
2018-10-31 20:05:21 +00:00
David Baker
c6ad0665b5
factor out duplicated test code
2018-10-31 18:03:40 +00:00
David Baker
8ab84dee16
PR feedback 1/n
2018-10-31 17:40:17 +00:00
David Baker
0e26247b53
Speed up time rather than increasing timeouts
2018-10-26 12:08:55 +01:00
David Baker
a6bf40d4e2
We can always import these now
2018-10-25 19:21:29 +01:00
David Baker
b3bb99d76a
Stop client after backup tests
2018-10-25 19:11:43 +01:00
David Baker
243bab7036
Merge branch 'dbkr/stop_devicelist' into dbkr/e2e_backups
2018-10-25 19:03:57 +01:00
David Baker
88b39f4b67
Stop devicelist when client is stopped
...
To avoid the devicelist trying to save after the client has been
stopped
Hopefully will fix random test failures on node 11.
2018-10-25 19:00:03 +01:00
Hubert Chathi
91fb7b0a7c
fix unit tests for backup recovery
2018-10-12 12:03:51 -04:00
Hubert Chathi
9b12c22823
de-lint plus some minor fixes
2018-10-12 10:38:10 -04:00
Hubert Chathi
3957006fae
Merge remote-tracking branch 'upstream/dbkr/e2e_backups' into e2e_backups
2018-10-11 14:01:26 -04:00
Hubert Chathi
da65f43983
wrap backup sending in a try, and add delays
2018-10-10 19:31:28 -04:00
David Baker
ada4b6ef16
Lint
2018-10-09 15:46:12 +01:00
Hubert Chathi
258adda67c
retry key backups when they fail
2018-10-04 15:19:20 -04:00
David Baker
ce2058aea9
Merge branch 'dbkr/wasm' into dbkr/e2e_backups
2018-10-02 16:54:36 +01:00
David Baker
63cc3fd890
lint
2018-09-25 18:14:11 +01:00
David Baker
c556ca40b1
Support Olm with WebAssembly
...
wasm Olm has a new interface: it now has an init method that needs
to be called and the promise it returns waited on before the Olm
module is used. Support that, and allow Crypto etc to be imported
whether Olm is enabled or not. Change whether olm is enabled to
be async since now it will be unavailable if the async module init
fails. Don't call getOlmVersion() until the Olm.init() is done.
2018-09-25 17:49:54 +01:00
David Baker
2f4c1dfcc4
Test all 3 code paths on backup restore
2018-09-18 17:33:47 +01:00
David Baker
e4bb37b1a8
Fix lint mostly
2018-09-18 14:53:59 +01:00
David Baker
54c443ac68
Make tests pass
2018-09-18 14:48:02 +01:00
Hubert Chathi
73e294b1bd
add copyright header to backup.spec
2018-08-23 00:29:29 -04:00
Hubert Chathi
75107f99b2
pass in key rather than decryption object to restoreKeyBackups
2018-08-23 00:26:21 -04:00
Hubert Chathi
1faf477537
fix formatting and fix authedRequest usage
2018-08-22 23:58:59 -04:00
Hubert Chathi
d55618921b
initial implementation of e2e key backup and restore
2018-08-07 23:10:55 -04:00
David Baker
8b649cec8d
All the copyrights
2018-01-18 11:52:27 +00:00
David Baker
27d28b8247
More test fixing
...
Allow localstorage store to take a localstorage impl, make TestClient
pass a cryptostore & fix True/true typo
2018-01-15 16:27:28 +00:00
David Baker
110f43a246
Make DeviceList test pass
...
Includes making saveIfDirty() return a promise in case you care
about when changes got saved (which the test does).
2018-01-15 15:21:39 +00:00
David Baker
e6dd573e8a
Fix test (needs a cryptostore now)
2017-12-06 19:42:01 +00:00
Hubert Chathi
8f252992e4
keep track of event ID and timestamp of decrypted messages
...
This is to avoid false positives when detecting replay attacks.
fixes : vector-im/riot-web#3712
Signed-off-by: Hubert Chathi <hubert@uhoreg.ca >
2017-10-11 23:27:36 -04:00
Richard van der Hoff
f00558d840
Merge remote-tracking branch 'origin/develop' into rav/async_crypto/1
2017-08-15 18:31:02 +01:00
Richard van der Hoff
8a0f73bf81
Make some OlmDevice megolm methods async
...
* OlmDevice.hasInboundSessionKeys
* OlmDevice.getInboundGroupSessionKey
The latter means that MegolmDecryption.shareKeysWithDevice takes longer before
it sends out the keyshare, so means the unit test needed an update
2017-08-10 15:01:56 +01:00