Skip to content

Commit

Permalink
Fix session verification
Browse files Browse the repository at this point in the history
In cases where *we* send start, we never updated the common mac codes, causing the wrong algorithm to be selected
  • Loading branch information
TobiasFella committed Jul 17, 2023
1 parent 0e10076 commit 3d3e481
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion gtad/gtad
Submodule gtad updated 3 files
+3 −0 model.cpp
+2 −10 printer.cpp
+1 −1 yaml-cpp

0 comments on commit 3d3e481

Please sign in to comment.