* Offer `m.qr_code.scan.v1` verification method by default
Normally, the application specifies the supported verification methods when
creating the MatrixClient (and matrix-react-sdk does so). If the application
leaves it unset, then the idea is that the js-sdk offers all known verification
methods.
However, by default, the rust-sdk doesn't specify `m.qr_code.scan.v1`. So
basically, we need to set our own list of supported methods, rather than
relying on the rust-sdk's defaults.
* Factor out base class from `RustSASVerifier`
* Implement QR code scanning
* Update src/rust-crypto/verification.ts
* implement `VerificationRequest.pending`
* Implement `VerificationRequest.timeout`
* Rust crypto: allow using a memory store (#3536)
* Rust crypto: allow using a memory store
It turns out that, for some usecases (in particular, "bot users" for cypress
tests), we don't need persistent storage and an in-memory store will be fine.
* Rust crypto: use a memory store for the unit tests
* Pass `supportedVerificationMethods` into `VerificationRequest`
... so that the application can later call `accept()` and we know what to send.
* Implement `VerificationRequest.accept`
* Implement `VerificationRequest.declining`
* Update src/rust-crypto/verification.ts
* integ tests: factor out some utility methods
* Add `VerificationRequest.startVerification` to replace `beginKeyVerification`
The rust SDK ties together creating the verifier and sending the
`m.key.verification.start` message, so we need to combine
`.beginKeyVerification` and `.verify`.
* add some unit tests
* Return uploaded keys from `/keys/query`
* Basic implementation of SAS verification in Rust
* Update the `verifier` *before* emitting `erificationRequestEvent.Change`
* remove dead code
A couple of tests were waiting for a request that wasn't happening, so timing
out after 1.5 seconds. Let's avoid the extra slowth.
(This was introduced by changes in
https://github.com/matrix-org/matrix-js-sdk/pull/3487, but the changes in this
PR do no harm anyway)
* Element-R: wait for OlmMachine on startup
Previously, if you called `CryptoApi.getUserDeviceInfo()` before the first
`/sync` request happened, it would return an empty list, which made a bunch of
the tests racy. Add a hack to get the OlmMachine to think about its device
lists during startup.
* add a test
* Add `crypto.getCrossSigningStatus`
* Fix imports and boolean casting
* Moved `isStoredInSecretStorage` into a single function
* Review changes `CrossSigningStatus`
* Review changes for `cross-signing.spec.ts`
* Add test in case when cross signing is not setup
* Handle when the `crossSigningStatus` returned by the olmMachine is null
* Review changes for `crypto-api` documentation
* Update `cross-signing.spec.ts` according to review changes
* Moved and renamed `isStoredInSecretStorage`
* Remove noise in `CrossSigning.ts` imports
* Fix `returns` sentence in `secretStorageContainsCrossSigningKeys`
* Fix typos
* Add test for `secret-storage.ts`
* Improve documentation
* Add doc about fetch mock request name
* OutgoingRequestProcessor: support for SigningKeysUploadRequest
* Tests
* Bump matrix-org/matrix-sdk-crypto-js
... to pick up bug fixes for outgoing requests
* Stub implementation of `isCrossSigningReady`
* Stub implementation of `isSecretStorageReady`
* add tests to meet quality gate
* factor out common
* Remove accidentally-added file
* Add `getUserDeviceInfo` to `CryptoBackend` and old crypto impl
* Add `getUserDeviceInfo` WIP impl to `rust-crypto`
* Add tests for `downloadUncached`
* WIP test
* Fix typo and use `downloadDeviceToJsDevice`
* Add `getUserDeviceInfo` to `client.ts`
* Use new `Device` class instead of `IDevice`
* Add tests for `device-convertor`
* Add method description for `isInRustUserIds` in `rust-crypto.ts`
* Misc
* Fix typo
* Fix `rustDeviceToJsDevice`
* Fix comments and new one
* Review of `device.ts`
* Remove `getUserDeviceInfo` from `client.ts`
* Review of `getUserDeviceInfo` in `rust-crypto.ts`
* Fix typo in `index.ts`
* Review `device-converter.ts`
* Add documentation to `getUserDeviceInfo` in `crypto-api.ts`
* Last changes in comments
* Element-R: implement `{get,set}TrustCrossSignedDevices`
A precursor to https://github.com/vector-im/element-web/issues/25092
* Pull out new `DeviceVerificationStatus`
Define a new base class to replace `DeviceTrustLevel`. The intention is to have
a cleaner interface which is easier to expose from the new crypto impl
* Define, and implement, a new `CryptoApi.getDeviceVerificationStatus`
This is similar to `checkDeviceTrust`, which we're deprecating, but:
* is `async`, meaning we can implement it in Rust
* Returns a `DeviceVerificationStatus` instead of a `DeviceTrustLevel`
* Returns `null` rather than "not verified" if the device is unknown
* add some tests
* Export DeviceVerificationStatus as a proper class
... so that we can instantiate it in tests
* Send one time key count and unused fallback keys for rust-crypto
* Add tests
* Remove useless type in promise return
* Add test for one time key upload
* Fix rust-crypto.spec.ts tests
* Remove unneeded code in test
* Add key upload request test
* Fix tests