Skip to content

Commit

Permalink
Merge #682(tobias): Fix session verification
Browse files Browse the repository at this point in the history
  • Loading branch information
KitsuneRal authored Jul 18, 2023
2 parents 0e10076 + 485b9a3 commit 035daed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Quotient/keyverificationsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ void KeyVerificationSession::handleEvent(const KeyVerificationEvent& baseEvent)
[this](const KeyVerificationAcceptEvent& event) {
if (state() != WAITINGFORACCEPT)
return false;
const auto& theirMac = event.messageAuthenticationCode();
for (const auto& mac : SupportedMacs) {
if (mac == theirMac) {
m_commonMacCodes.push_back(theirMac);
}
}
if (m_commonMacCodes.isEmpty()) {
cancelVerification(UNKNOWN_METHOD);
return false;
}
m_commitment = event.commitment();
sendKey();
setState(WAITINGFORKEY);
Expand Down

0 comments on commit 035daed

Please sign in to comment.