[go: up one dir, main page]

Fix Verification getting stuck

Related: connect2x/trixnity-messenger/trixnity-messenger#613 (closed)

When two trixnity clients verify one another, verification fails.

Changes:

  1. We wait until we have both their and our SasMacEventContent before signing and sending VerificationDone
  2. Ensure we send and handle events in the correct order

Analysis:

  1. When we receive SasMacEventContent, we send VerificationDone
  2. When we sendAndHandle VerificationDone, we update our state to Done/WaitForDone
  3. When we later sendAndHandle our own SasMacEventContent, our state is already at Done/WaitForDone
  4. Handling SasMacEventContent requires our state to be at ComparisonByUser or WaitForMac

The process looks something like this:

  1. handleVerificationStep(SasMacEventContent, isOurOwn=false)Receive their event
  2. __sendVerificationStepAndHandleIt(VerificationDoneEventContent)
  3. ____handleVerificationStep(VerificationDoneEventContent, isOurOwn=true)
  4. ______state = WaitForDoneupdate state
  5. ____sendVerificationStep(VerificationDoneEventContent)
  6. match()send our event
  7. __sendVerificationStepAndHandleIt(SasMacEventContent)
  8. ____handleVerificationStep(SasMacEventContent, isOurOwn=true)
  9. ______if (currentState is ComparisonByUser || currentState is WaitForMacs)precondition fails
Edited by Janne Mareike Koschinski

Merge request reports

Loading