Skip to content

Commit

Permalink
Fix errant VerifyOrReturn in CASESession (#23944)
Browse files Browse the repository at this point in the history
In CASESession::HandleSigma2 it should be VerifyOrExit not
VerifyOrReturn.

Otherwise, if it fails, a status report message won't be sent as
intended.
  • Loading branch information
mlepage-google authored and pull[bot] committed Jun 5, 2023
1 parent 13682a7 commit 2770529
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CASESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ CHIP_ERROR CASESession::HandleSigma2(System::PacketBufferHandle && msg)

// Verify that responderNodeId (from responderNOC) matches one that was included
// in the computation of the Destination Identifier when generating Sigma1.
VerifyOrReturnError(mPeerNodeId == responderNodeId, CHIP_ERROR_INVALID_CASE_PARAMETER);
VerifyOrExit(mPeerNodeId == responderNodeId, err = CHIP_ERROR_INVALID_CASE_PARAMETER);

// Construct msg_R2_Signed and validate the signature in msg_r2_encrypted
msg_r2_signed_len = TLV::EstimateStructOverhead(sizeof(uint16_t), responderNOC.size(), responderICAC.size(),
Expand Down

0 comments on commit 2770529

Please sign in to comment.