-
-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Element-R: support for starting a SAS verification #3528
Conversation
…ication` The rust SDK ties together creating the verifier and sending the `m.key.verification.start` message, so we need to combine `.beginKeyVerification` and `.verify`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good to me!
@@ -458,6 +459,13 @@ export class VerificationRequest<C extends IVerificationChannel = IVerificationC | |||
return this._verifier!; | |||
} | |||
|
|||
public async startVerification(method: string): Promise<Verifier> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it desirable to have a list of supported methods here, rather than using string
as a type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
possibly, though we do have to support string
s on all the other methods for backwards compatibility, so it's not an obvious win.
matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification
matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification
matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification
* Cypress: `crypto.verification.request` -> `crypto.verificationRequestReceived` matrix-org/matrix-js-sdk#3514 deprecated crypto.verification.request. * Cypress: `beginKeyVerification` -> `startVerification` matrix-org/matrix-js-sdk#3528 deprecated beginKeyVerification * simplify `setupBotClient` no functional change here, just combining the various `cy.wrap()`ed things into a single async func * Cypress: Use Rust crypto for the bot user in verification tests We can already start using the Rust crypto implementation for the "bot" user in the verification tests!
* Drop support for Node 16 ([\matrix-org#3533](matrix-org#3533)). * Improve types around login, registration, UIA and identity servers ([\matrix-org#3537](matrix-org#3537)). * **The Browserify artifact is being deprecated, scheduled for removal in the October 10th release cycle. (matrix-org#3189)** * Simplify `MatrixClient::setPowerLevel` API ([\matrix-org#3570](matrix-org#3570)). Fixes element-hq/element-web#13900 and matrix-org#1844. * Deprecate `VerificationRequest.getQRCodeBytes` and replace it with the asynchronous `generateQRCode`. ([\matrix-org#3562](matrix-org#3562)). * Deprecate `VerificationRequest.beginKeyVerification()` in favour of `VerificationRequest.startVerification()`. ([\matrix-org#3528](matrix-org#3528)). * Deprecate `Crypto.VerificationRequest` application event, replacing it with `Crypto.VerificationRequestReceived`. ([\matrix-org#3514](matrix-org#3514)). * Throw saner error when peeking has its room pulled out from under it ([\matrix-org#3577](matrix-org#3577)). Fixes element-hq/element-web#18679. * OIDC: Log in ([\matrix-org#3554](matrix-org#3554)). Contributed by @kerryarchibald. * Prevent threads code from making identical simultaneous API hits ([\matrix-org#3541](matrix-org#3541)). Fixes element-hq/element-web#25395. * Update IUnsigned type to be extensible ([\matrix-org#3547](matrix-org#3547)). * add stop() api to BackupManager for clean shutdown ([\matrix-org#3553](matrix-org#3553)). * Log the message ID of any undecryptable to-device messages ([\matrix-org#3543](matrix-org#3543)). * Ignore thread relations on state events for consistency with edits ([\matrix-org#3540](matrix-org#3540)). * OIDC: validate id token ([\matrix-org#3531](matrix-org#3531)). Contributed by @kerryarchibald. * Fix read receipt sending behaviour around thread roots ([\matrix-org#3600](matrix-org#3600)). * Fix `TypedEventEmitter::removeAllListeners(void)` not working ([\matrix-org#3561](matrix-org#3561)). * Don't allow Olm unwedging rate-limiting to race ([\matrix-org#3549](matrix-org#3549)). Fixes element-hq/element-web#25716. * Fix an instance of failed to decrypt error when an in flight `/keys/query` fails. ([\matrix-org#3486](matrix-org#3486)). * Use the right anchor emoji for SAS verification ([\matrix-org#3534](matrix-org#3534)). * fix a bug which caused the wrong emoji to be shown during SAS device verification. ([\matrix-org#3523](matrix-org#3523)).
Once we have a verification request in flight, we can start a SAS flow by sending an
m.key.verification.start
. This is slightly fiddly because at the moment the js-sdk breaks this into two steps: first do a.beginKeyVerification
on theVerificationRequest
to immediately get aVerifier
, and then call.verify
on theVerifier
to send thestart
message.However, in the Rust world, creating the equivalent to a verifier is asynchronous and sends the
start
message.So, we create a new method which does both, and implement it in legacy crypto for forward compatibility.
Notes: Deprecate
VerificationRequest.beginKeyVerification()
in favour ofVerificationRequest.startVerification()
.Part of element-hq/element-web#25320.
Here's what your changelog entry will look like:
🦖 Deprecations
VerificationRequest.beginKeyVerification()
in favour ofVerificationRequest.startVerification()
. (#3528).