Travis Ralston
dfb918adc3
Lint pass 3
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
Travis Ralston
486369e97c
Clean up "base-apis" find&replace
2021-06-02 13:42:20 -06:00
Germain Souquet
5caf05cfa1
Apply new linting rules
2021-05-11 11:25:43 +01:00
J. Ryan Stinnett
3166a4880d
Move cross-signing key request path out of verification
...
This was always quite awkwardly placed in verification, so this moves it to
somewhere more expected. No changes are made to the logic or features in this
commit.
2020-08-06 16:39:56 +01:00
J. Ryan Stinnett
a9c9ec3977
Replace Riot with Element in docs and comments
...
This only covers the simple cases of references to issues and repos. More
complex areas, such as deployment scripts, will be handled separately.
Part of https://github.com/vector-im/element-web/issues/14864
2020-08-03 18:32:52 +01:00
Bruno Windels
025f964b0b
Merge pull request #1357 from matrix-org/bwindels/fixwaitforeventrace
...
Handle race between sending and await next event from other party
2020-04-29 13:53:35 +00:00
Bruno Windels
59412aba51
handle race between sending and await next event from other party
2020-04-29 15:45:51 +02:00
David Baker
7c1f3e4519
Make getStoredDevice calls sync
2020-04-29 11:50:18 +01:00
Bruno Windels
11727833a2
mark request as cancelled immediately after verifier is cancelled
...
in case send errors prevent us from receiving remote echo
2020-04-09 17:54:45 +02: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
8cdc635cad
lint and aldo indent in a more traditional way
2020-03-26 16:12:11 +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
J. Ryan Stinnett
b5eea01848
Fix secret sharing names to match spec
...
When sharing keys, we should use `m.cross_signing` prefix.
Part of https://github.com/vector-im/riot-web/issues/12661
2020-03-09 13:40:02 +00: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
Bruno Windels
ecaf21ceb0
Don't require .done event for finishing self-verification
...
Instead, call onVerifierFinished from the verifier on the request
so we can internally mark it as done. This flag is not persisted,
but we don't have historical (persisted) to-device requests anyway.
2020-02-28 14:56:38 +01:00
Bruno Windels
90f400abe1
log when switching start event
2020-02-27 17:35:58 +01:00
Bruno Windels
aec79f3a79
don't assume verify has been called when receiving a cancellation in verifier
2020-02-21 17:26:29 +01:00
David Baker
616f73d8c6
forgive me, o great linter
2020-02-04 12:12:02 +00:00
David Baker
cf94527bd5
Add a bunch of logging to verification
...
So we have a better idea of what's going on
2020-02-04 12:04:50 +00:00
Bruno Windels
efd3550f53
support switching startEvent while waiting for .accept on initiator side
...
if we get a .start event from the other party and we've also sent one,
the .start event with the sender that is first in sorting order should
be taken, and the other one ignored.
At the point where we will receive it, the verifier has already
been returned from beginKeyVerification, so we'll need to switch
start event internally, and retry the verification, now on the
receiver (sending .accept) side instead of initiator side
(sending .start).
2020-01-29 15:13:59 +01:00
Bruno Windels
cbe2965849
mention reason in cancellation error
2020-01-17 19:01:30 +01:00
Travis Ralston
1205178e26
Merge branch 'develop' into bwindels/verification-right-panel
2020-01-16 13:13:00 -07:00
Bruno Windels
8ed51c806e
don't cancel or timeout when verify isn't called
2020-01-03 13:42:06 +01:00
Travis Ralston
d3ce0cb82f
Convert src to ES6
...
The bulk of this is just export/import changes, though there's a couple pieces to highlight:
* We no longer use default exports. This is because it's discouraged by the JS community, though not in any official capacity.
* We now use `polyfillSuper` for some prototype inheritance because the tests, and sometimes webpack, break on "cannot call EncryptionAlgorithm without 'new'". It's very much a workaround, and definitely not needed when we use real classes.
There is some import shuffling to help keep the imports clean - this was done by my IDE.
2019-12-17 15:14:22 -07:00
Hubert Chathi
49f0e368d0
Merge pull request #1104 from matrix-org/uhoreg/ignore_verification_done
...
ignore m.key.verification.done messages when we don't expect any more messages
2019-12-10 09:27:22 -05:00
Bruno Windels
dd40435425
make verifier use channel instead of client straight away
...
so it is agnostic of the channel used
2019-12-09 17:45:01 +01:00
Hubert Chathi
e1e9f690c9
ignore m.key.verification.done messages when we don't expect any more messages
2019-12-05 12:53:59 -05:00
Bruno Windels
c785b10603
Merge pull request #1077 from matrix-org/bwindels/dm-verif-in-e2ee-rooms
...
Fix SAS verification in encrypted DMs
2019-11-19 14:32:01 +00:00
Bruno Windels
3b02b62ba5
add m.relates_to back to the content on the requesting side for e2e room
...
as it needs to be added to the commitment hash
as before, getContent() in an e2ee room doesn't return the relation
2019-11-18 18:34:05 +01:00
Bruno Windels
24ae787736
make it explicit that the transaction id is added for the start event
...
as it should included in the commitment hash
2019-11-18 18:33:11 +01:00
Bruno Windels
180fea8ace
only send decrypted events to Verifier in e2ee rooms
2019-11-18 18:30:43 +01:00
David Baker
ac91367801
Merge pull request #832 from matrix-org/dbkr/cross_signing
...
Cross Signing Support
2019-11-15 16:09:06 +00:00
Bruno Windels
62e490cfe4
add FIXME note for (expected) uncaught rejection
2019-11-06 12:36:50 +01:00
Bruno Windels
37558ac1b4
detect other end cancelling and reject main promise
2019-11-04 14:43:44 +01:00
Bruno Windels
9140d5a091
don't clear expected type before including it in error
2019-11-04 14:37:12 +01:00
David Baker
3e2d845342
Merge remote-tracking branch 'origin/develop' into dbkr/cross_signing
2019-10-28 16:47:16 +00:00
Hubert Chathi
0f1206b4ee
apply suggestions from review
2019-10-22 13:29:24 -04:00
Hubert Chathi
5f3492dbf8
send the m.key.verification.done message when done
2019-10-09 11:13:32 -04:00
Hubert Chathi
d8e8dddd25
initial implementation of verification in DMs
2019-10-08 15:44:51 -04:00
Travis Ralston
f80af68686
End the verification timer when verification is done
...
Fixes https://github.com/matrix-org/matrix-js-sdk/issues/980
This also improves cleanliness in the tests to cancel/terminate timers when needed.
2019-07-10 14:51:12 -06:00
Travis Ralston
7cb8de5b69
Appease the linter
2019-06-20 14:17:51 -06:00
Travis Ralston
5c2fb1c42b
Null check and naming
2019-06-20 14:12:16 -06:00
Travis Ralston
e34eb48914
Don't timeout cancelled requests
...
The cancelled flag is used upstream and is therefore public.
2019-06-19 14:44:36 -06:00
Travis Ralston
05ab6ef3ab
Time out verification attempts after 10 minutes of inactivity
...
Fixes https://github.com/vector-im/riot-web/issues/10117
2019-06-19 14:15:58 -06:00
Hubert Chathi
6f6e7ea921
verify cross-signing key with SAS
2019-06-05 15:27:31 -04:00
Hubert Chathi
3c7c9048eb
add missing logger
2019-06-05 14:04:39 -04:00
Hubert Chathi
2af311bd7d
verification: don't error if we don't know about some keys
2019-06-05 11:56:37 -04:00
Hubert Chathi
244e1b84f7
Initial implementation of key verification
2019-01-23 13:34:25 -05:00