45
45
#include < protocols/secure_channel/SessionResumptionStorage.h>
46
46
#include < protocols/secure_channel/StatusReport.h>
47
47
#include < system/SystemClock.h>
48
- #include < system/TLVPacketBufferBackingStore.h>
49
48
#include < tracing/macros.h>
50
49
#include < tracing/metric_event.h>
51
50
#include < transport/SessionManager.h>
68
67
kTag_TBSData_ReceiverPubKey = 4 ,
69
68
};
70
69
71
- enum
72
- {
73
- kTag_Sigma1_InitiatorRandom = 1 ,
74
- kTag_Sigma1_InitiatorSessionId = 2 ,
75
- kTag_Sigma1_DestinationId = 3 ,
76
- kTag_Sigma1_InitiatorEphPubKey = 4 ,
77
- kTag_Sigma1_InitiatorMRPParams = 5 ,
78
- kTag_Sigma1_ResumptionID = 6 ,
79
- kTag_Sigma1_InitiatorResumeMIC = 7 ,
80
- };
70
+ inline constexpr uint8_t kInitiatorRandomTag = 1 ;
71
+ inline constexpr uint8_t kInitiatorSessionIdTag = 2 ;
72
+ inline constexpr uint8_t kDestinationIdTag = 3 ;
73
+ inline constexpr uint8_t kInitiatorPubKeyTag = 4 ;
74
+ inline constexpr uint8_t kInitiatorMRPParamsTag = 5 ;
75
+ inline constexpr uint8_t kResumptionIDTag = 6 ;
76
+ inline constexpr uint8_t kResume1MICTag = 7 ;
81
77
82
78
enum
83
79
{
@@ -770,24 +766,19 @@ void CASESession::HandleConnectionClosed(Transport::ActiveTCPConnectionState * c
770
766
CHIP_ERROR CASESession::SendSigma1 ()
771
767
{
772
768
MATTER_TRACE_SCOPE (" SendSigma1" , " CASESession" );
773
- size_t data_len = TLV::EstimateStructOverhead (kSigmaParamRandomNumberSize , // initiatorRandom
774
- sizeof (uint16_t ), // initiatorSessionId,
775
- kSHA256_Hash_Length , // destinationId
776
- kP256_PublicKey_Length , // InitiatorEphPubKey,
777
- SessionParameters::kEstimatedTLVSize , // initiatorSessionParams
778
- SessionResumptionStorage::kResumptionIdSize , CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES);
779
769
780
- System::PacketBufferTLVWriter tlvWriter;
781
770
System::PacketBufferHandle msg_R1;
782
- TLV::TLVType outerContainerType = TLV::kTLVType_NotSpecified ;
783
771
uint8_t destinationIdentifier[kSHA256_Hash_Length ] = { 0 };
784
772
773
+ Sigma1Param encodeSigma1Params;
774
+
785
775
// Lookup fabric info.
786
776
const auto * fabricInfo = mFabricsTable ->FindFabricWithIndex (mFabricIndex );
787
777
VerifyOrReturnError (fabricInfo != nullptr , CHIP_ERROR_INCORRECT_STATE);
788
778
789
779
// Validate that we have a session ID allocated.
790
780
VerifyOrReturnError (GetLocalSessionId ().HasValue (), CHIP_ERROR_INCORRECT_STATE);
781
+ encodeSigma1Params.initiatorSessionId = GetLocalSessionId ().Value ();
791
782
792
783
// Generate an ephemeral keypair
793
784
mEphemeralKey = mFabricsTable ->AllocateEphemeralKeypairForCASE ();
@@ -797,16 +788,6 @@ CHIP_ERROR CASESession::SendSigma1()
797
788
// Fill in the random value
798
789
ReturnErrorOnFailure (DRBG_get_bytes (mInitiatorRandom , sizeof (mInitiatorRandom )));
799
790
800
- // Construct Sigma1 Msg
801
- msg_R1 = System::PacketBufferHandle::New (data_len);
802
- VerifyOrReturnError (!msg_R1.IsNull (), CHIP_ERROR_NO_MEMORY);
803
-
804
- tlvWriter.Init (std::move (msg_R1));
805
- ReturnErrorOnFailure (tlvWriter.StartContainer (TLV::AnonymousTag (), TLV::kTLVType_Structure , outerContainerType));
806
- ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (1 ), ByteSpan (mInitiatorRandom )));
807
- // Retrieve Session Identifier
808
- ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (2 ), GetLocalSessionId ().Value ()));
809
-
810
791
// Generate a Destination Identifier based on the node we are attempting to reach
811
792
{
812
793
// Obtain originator IPK matching the fabric where we are trying to open a session. mIPK
@@ -821,14 +802,10 @@ CHIP_ERROR CASESession::SendSigma1()
821
802
MutableByteSpan destinationIdSpan (destinationIdentifier);
822
803
ReturnErrorOnFailure (GenerateCaseDestinationId (ByteSpan (mIPK ), ByteSpan (mInitiatorRandom ), rootPubKeySpan, fabricId,
823
804
mPeerNodeId , destinationIdSpan));
805
+ encodeSigma1Params.destinationId = destinationIdSpan;
824
806
}
825
- ReturnErrorOnFailure (tlvWriter.PutBytes (TLV::ContextTag (3 ), destinationIdentifier, sizeof (destinationIdentifier)));
826
-
827
- ReturnErrorOnFailure (
828
- tlvWriter.PutBytes (TLV::ContextTag (4 ), mEphemeralKey ->Pubkey (), static_cast <uint32_t >(mEphemeralKey ->Pubkey ().Length ())));
829
807
830
808
VerifyOrReturnError (mLocalMRPConfig .HasValue (), CHIP_ERROR_INCORRECT_STATE);
831
- ReturnErrorOnFailure (EncodeSessionParameters (TLV::ContextTag (5 ), mLocalMRPConfig .Value (), tlvWriter));
832
809
833
810
// Try to find persistent session, and resume it.
834
811
bool resuming = false ;
@@ -839,20 +816,20 @@ CHIP_ERROR CASESession::SendSigma1()
839
816
if (err == CHIP_NO_ERROR)
840
817
{
841
818
// Found valid resumption state, try to resume the session.
842
- ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (6 ), mResumeResumptionId ));
843
819
844
- uint8_t initiatorResume1MIC[CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES];
845
- MutableByteSpan resumeMICSpan (initiatorResume1MIC);
820
+ MutableByteSpan resumeMICSpan (encodeSigma1Params.initiatorResume1MIC );
846
821
ReturnErrorOnFailure (GenerateSigmaResumeMIC (ByteSpan (mInitiatorRandom ), ByteSpan (mResumeResumptionId ),
847
822
ByteSpan (kKDFS1RKeyInfo ), ByteSpan (kResume1MIC_Nonce ), resumeMICSpan));
848
823
849
- ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (7 ), resumeMICSpan));
824
+ encodeSigma1Params.initiatorResumeMICSpan = resumeMICSpan;
825
+ encodeSigma1Params.sessionResumptionRequested = true ;
826
+
850
827
resuming = true ;
851
828
}
852
829
}
853
830
854
- ReturnErrorOnFailure (tlvWriter. EndContainer (outerContainerType));
855
- ReturnErrorOnFailure (tlvWriter. Finalize (& msg_R1));
831
+ // Encode Sigma1 into into msg_R1
832
+ ReturnErrorOnFailure (EncodeSigma1 ( msg_R1, encodeSigma1Params ));
856
833
857
834
ReturnErrorOnFailure (mCommissioningHash .AddData (ByteSpan{ msg_R1->Start (), msg_R1->DataLength () }));
858
835
@@ -884,6 +861,52 @@ CHIP_ERROR CASESession::SendSigma1()
884
861
return CHIP_NO_ERROR;
885
862
}
886
863
864
+ CHIP_ERROR CASESession::EncodeSigma1 (System::PacketBufferHandle & msg, Sigma1Param & inputParams)
865
+ {
866
+
867
+ MATTER_TRACE_SCOPE (" EncodeSigma1" , " CASESession" );
868
+
869
+ size_t data_len = TLV::EstimateStructOverhead (kSigmaParamRandomNumberSize , // initiatorRandom
870
+ sizeof (uint16_t ), // initiatorSessionId,
871
+ kSHA256_Hash_Length , // destinationId
872
+ kP256_PublicKey_Length , // InitiatorEphPubKey,
873
+ SessionParameters::kEstimatedTLVSize , // initiatorSessionParams
874
+ SessionResumptionStorage::kResumptionIdSize , CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES);
875
+
876
+ msg = System::PacketBufferHandle::New (data_len);
877
+ VerifyOrReturnError (!msg.IsNull (), CHIP_ERROR_NO_MEMORY);
878
+
879
+ System::PacketBufferTLVWriter tlvWriter;
880
+ TLV::TLVType outerContainerType = TLV::kTLVType_NotSpecified ;
881
+
882
+ tlvWriter.Init (std::move (msg));
883
+ ReturnErrorOnFailure (tlvWriter.StartContainer (TLV::AnonymousTag (), TLV::kTLVType_Structure , outerContainerType));
884
+ // TODO Pass this in the struct?
885
+ ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (kInitiatorRandomTag ), ByteSpan (mInitiatorRandom )));
886
+ ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (kInitiatorSessionIdTag ), inputParams.initiatorSessionId ));
887
+
888
+ ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (kDestinationIdTag ), inputParams.destinationId ));
889
+
890
+ // TODO Pass this in the struct?
891
+ ReturnErrorOnFailure (tlvWriter.PutBytes (TLV::ContextTag (kInitiatorPubKeyTag ), mEphemeralKey ->Pubkey (),
892
+ static_cast <uint32_t >(mEphemeralKey ->Pubkey ().Length ())));
893
+
894
+ // TODO is it redudunt?
895
+ VerifyOrReturnError (mLocalMRPConfig .HasValue (), CHIP_ERROR_INCORRECT_STATE);
896
+ ReturnErrorOnFailure (EncodeSessionParameters (TLV::ContextTag (kInitiatorMRPParamsTag ), mLocalMRPConfig .Value (), tlvWriter));
897
+
898
+ if (inputParams.sessionResumptionRequested )
899
+ {
900
+ ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (kResumptionIDTag ), mResumeResumptionId ));
901
+ ReturnErrorOnFailure (tlvWriter.Put (TLV::ContextTag (kResume1MICTag ), inputParams.initiatorResumeMICSpan ));
902
+ }
903
+
904
+ ReturnErrorOnFailure (tlvWriter.EndContainer (outerContainerType));
905
+ ReturnErrorOnFailure (tlvWriter.Finalize (&msg));
906
+
907
+ return CHIP_NO_ERROR;
908
+ }
909
+
887
910
CHIP_ERROR CASESession::HandleSigma1_and_SendSigma2 (System::PacketBufferHandle && msg)
888
911
{
889
912
MATTER_TRACE_SCOPE (" HandleSigma1_and_SendSigma2" , " CASESession" );
@@ -923,7 +946,7 @@ CHIP_ERROR CASESession::FindLocalNodeFromDestinationId(const ByteSpan & destinat
923
946
MutableByteSpan candidateDestinationIdSpan (candidateDestinationId);
924
947
ByteSpan candidateIpkSpan (ipkKeySet.epoch_keys [keyIdx].key );
925
948
926
- err = GenerateCaseDestinationId (ByteSpan ( candidateIpkSpan), ByteSpan ( initiatorRandom) , rootPubKeySpan, fabricId, nodeId,
949
+ err = GenerateCaseDestinationId (candidateIpkSpan, initiatorRandom, rootPubKeySpan, fabricId, nodeId,
927
950
candidateDestinationIdSpan);
928
951
if ((err == CHIP_NO_ERROR) && (candidateDestinationIdSpan.data_equal (destinationId)))
929
952
{
@@ -974,38 +997,43 @@ CHIP_ERROR CASESession::TryResumeSession(SessionResumptionStorage::ConstResumpti
974
997
CHIP_ERROR CASESession::HandleSigma1 (System::PacketBufferHandle && msg)
975
998
{
976
999
MATTER_TRACE_SCOPE (" HandleSigma1" , " CASESession" );
977
- CHIP_ERROR err = CHIP_NO_ERROR;
978
- System::PacketBufferTLVReader tlvReader;
979
-
980
- uint16_t initiatorSessionId;
981
- ByteSpan destinationIdentifier;
982
- ByteSpan initiatorRandom;
983
-
984
1000
ChipLogProgress (SecureChannel, " Received Sigma1 msg" );
985
1001
MATTER_TRACE_COUNTER (" Sigma1" );
986
1002
987
- bool sessionResumptionRequested = false ;
988
- ByteSpan resumptionId ;
989
- ByteSpan resume1MIC;
990
- ByteSpan initiatorPubKey ;
1003
+ CHIP_ERROR err = CHIP_NO_ERROR ;
1004
+ System::PacketBufferTLVReader tlvReader ;
1005
+
1006
+ Sigma1Param parsedSigma1 ;
991
1007
992
1008
SuccessOrExit (err = mCommissioningHash .AddData (ByteSpan{ msg->Start (), msg->DataLength () }));
993
1009
994
1010
tlvReader.Init (std::move (msg));
995
- SuccessOrExit (err = ParseSigma1 (tlvReader, initiatorRandom, initiatorSessionId, destinationIdentifier, initiatorPubKey,
996
- sessionResumptionRequested, resumptionId, resume1MIC));
997
1011
998
- ChipLogDetail (SecureChannel, " Peer assigned session key ID %d" , initiatorSessionId);
999
- SetPeerSessionId (initiatorSessionId);
1012
+ SuccessOrExit (err = ParseSigma1 (tlvReader, parsedSigma1));
1013
+
1014
+ ChipLogDetail (SecureChannel, " Peer assigned session key ID %d" , parsedSigma1.initiatorSessionId );
1015
+ SetPeerSessionId (parsedSigma1.initiatorSessionId );
1000
1016
1001
1017
VerifyOrExit (mFabricsTable != nullptr , err = CHIP_ERROR_INCORRECT_STATE);
1002
1018
1003
- if (sessionResumptionRequested && resumptionId.size () == SessionResumptionStorage::kResumptionIdSize &&
1019
+ // TODO: Added by Amine, taken from inside ParseSigma1
1020
+ // This was removed to remove the non-parsing parts from ParseSigma1, decoupling it from higher levels
1021
+ // TODO: Should i change it?
1022
+ // Set the recieved MRP parameters included with Sigma1
1023
+ if (parsedSigma1.InitiatorMRPParamsPresent == true )
1024
+ {
1025
+ mExchangeCtxt .Value ()->GetSessionHandle ()->AsUnauthenticatedSession ()->SetRemoteSessionParameters (
1026
+ GetRemoteSessionParameters ());
1027
+ }
1028
+
1029
+ if (parsedSigma1.sessionResumptionRequested &&
1030
+ parsedSigma1.resumptionId .size () == SessionResumptionStorage::kResumptionIdSize &&
1004
1031
CHIP_NO_ERROR ==
1005
- TryResumeSession (SessionResumptionStorage::ConstResumptionIdView (resumptionId.data ()), resume1MIC, initiatorRandom))
1032
+ TryResumeSession (SessionResumptionStorage::ConstResumptionIdView (parsedSigma1.resumptionId .data ()),
1033
+ parsedSigma1.initiatorResumeMICSpan , parsedSigma1.initiatorRandom ))
1006
1034
{
1007
- std::copy (initiatorRandom.begin (), initiatorRandom.end (), mInitiatorRandom );
1008
- std::copy (resumptionId.begin (), resumptionId.end (), mResumeResumptionId .begin ());
1035
+ std::copy (parsedSigma1. initiatorRandom .begin (), parsedSigma1. initiatorRandom .end (), mInitiatorRandom );
1036
+ std::copy (parsedSigma1. resumptionId .begin (), parsedSigma1. resumptionId .end (), mResumeResumptionId .begin ());
1009
1037
1010
1038
// Send Sigma2Resume message to the initiator
1011
1039
MATTER_LOG_METRIC_BEGIN (kMetricDeviceCASESessionSigma2Resume );
@@ -1023,7 +1051,7 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg)
1023
1051
}
1024
1052
1025
1053
// Attempt to match the initiator's desired destination based on local fabric table.
1026
- err = FindLocalNodeFromDestinationId (destinationIdentifier, initiatorRandom);
1054
+ err = FindLocalNodeFromDestinationId (parsedSigma1. destinationId , parsedSigma1. initiatorRandom );
1027
1055
if (err == CHIP_NO_ERROR)
1028
1056
{
1029
1057
ChipLogProgress (SecureChannel, " CASE matched destination ID: fabricIndex %u, NodeID 0x" ChipLogFormatX64,
@@ -1035,13 +1063,13 @@ CHIP_ERROR CASESession::HandleSigma1(System::PacketBufferHandle && msg)
1035
1063
else
1036
1064
{
1037
1065
ChipLogError (SecureChannel, " CASE failed to match destination ID with local fabrics" );
1038
- ChipLogByteSpan (SecureChannel, destinationIdentifier );
1066
+ ChipLogByteSpan (SecureChannel, parsedSigma1. destinationId );
1039
1067
}
1040
1068
SuccessOrExit (err);
1041
1069
1042
1070
// ParseSigma1 ensures that:
1043
1071
// mRemotePubKey.Length() == initiatorPubKey.size() == kP256_PublicKey_Length.
1044
- memcpy (mRemotePubKey .Bytes (), initiatorPubKey .data (), mRemotePubKey .Length ());
1072
+ memcpy (mRemotePubKey .Bytes (), parsedSigma1. initiatorEphPubKey .data (), mRemotePubKey .Length ());
1045
1073
1046
1074
MATTER_LOG_METRIC_BEGIN (kMetricDeviceCASESessionSigma2 );
1047
1075
err = SendSigma2 ();
@@ -2163,46 +2191,36 @@ CHIP_ERROR CASESession::OnFailureStatusReport(Protocols::SecureChannel::GeneralS
2163
2191
return err;
2164
2192
}
2165
2193
2166
- CHIP_ERROR CASESession::ParseSigma1 (TLV::ContiguousBufferTLVReader & tlvReader, ByteSpan & initiatorRandom,
2167
- uint16_t & initiatorSessionId, ByteSpan & destinationId, ByteSpan & initiatorEphPubKey,
2168
- bool & resumptionRequested, ByteSpan & resumptionId, ByteSpan & initiatorResumeMIC)
2194
+ CHIP_ERROR CASESession::ParseSigma1 (TLV::ContiguousBufferTLVReader & tlvReader, Sigma1Param & output)
2169
2195
{
2170
2196
using namespace TLV ;
2171
2197
2172
- constexpr uint8_t kInitiatorRandomTag = 1 ;
2173
- constexpr uint8_t kInitiatorSessionIdTag = 2 ;
2174
- constexpr uint8_t kDestinationIdTag = 3 ;
2175
- constexpr uint8_t kInitiatorPubKeyTag = 4 ;
2176
- constexpr uint8_t kInitiatorMRPParamsTag = 5 ;
2177
- constexpr uint8_t kResumptionIDTag = 6 ;
2178
- constexpr uint8_t kResume1MICTag = 7 ;
2179
-
2180
2198
TLVType containerType = kTLVType_Structure ;
2181
2199
ReturnErrorOnFailure (tlvReader.Next (containerType, AnonymousTag ()));
2182
2200
ReturnErrorOnFailure (tlvReader.EnterContainer (containerType));
2183
2201
2184
2202
ReturnErrorOnFailure (tlvReader.Next (ContextTag (kInitiatorRandomTag )));
2185
- ReturnErrorOnFailure (tlvReader.GetByteView (initiatorRandom));
2186
- VerifyOrReturnError (initiatorRandom.size () == kSigmaParamRandomNumberSize , CHIP_ERROR_INVALID_CASE_PARAMETER);
2203
+ ReturnErrorOnFailure (tlvReader.GetByteView (output. initiatorRandom ));
2204
+ VerifyOrReturnError (output. initiatorRandom .size () == kSigmaParamRandomNumberSize , CHIP_ERROR_INVALID_CASE_PARAMETER);
2187
2205
2188
2206
ReturnErrorOnFailure (tlvReader.Next (ContextTag (kInitiatorSessionIdTag )));
2189
- ReturnErrorOnFailure (tlvReader.Get (initiatorSessionId));
2207
+ ReturnErrorOnFailure (tlvReader.Get (output. initiatorSessionId ));
2190
2208
2191
2209
ReturnErrorOnFailure (tlvReader.Next (ContextTag (kDestinationIdTag )));
2192
- ReturnErrorOnFailure (tlvReader.GetByteView (destinationId));
2193
- VerifyOrReturnError (destinationId.size () == kSHA256_Hash_Length , CHIP_ERROR_INVALID_CASE_PARAMETER);
2210
+ ReturnErrorOnFailure (tlvReader.GetByteView (output. destinationId ));
2211
+ VerifyOrReturnError (output. destinationId .size () == kSHA256_Hash_Length , CHIP_ERROR_INVALID_CASE_PARAMETER);
2194
2212
2195
2213
ReturnErrorOnFailure (tlvReader.Next (ContextTag (kInitiatorPubKeyTag )));
2196
- ReturnErrorOnFailure (tlvReader.GetByteView (initiatorEphPubKey));
2197
- VerifyOrReturnError (initiatorEphPubKey.size () == kP256_PublicKey_Length , CHIP_ERROR_INVALID_CASE_PARAMETER);
2214
+ ReturnErrorOnFailure (tlvReader.GetByteView (output. initiatorEphPubKey ));
2215
+ VerifyOrReturnError (output. initiatorEphPubKey .size () == kP256_PublicKey_Length , CHIP_ERROR_INVALID_CASE_PARAMETER);
2198
2216
2199
2217
// Optional members start here.
2200
2218
CHIP_ERROR err = tlvReader.Next ();
2201
2219
if (err == CHIP_NO_ERROR && tlvReader.GetTag () == ContextTag (kInitiatorMRPParamsTag ))
2202
2220
{
2203
2221
ReturnErrorOnFailure (DecodeMRPParametersIfPresent (TLV::ContextTag (kInitiatorMRPParamsTag ), tlvReader));
2204
- mExchangeCtxt . Value ()-> GetSessionHandle ()-> AsUnauthenticatedSession ()-> SetRemoteSessionParameters (
2205
- GetRemoteSessionParameters ());
2222
+ output. InitiatorMRPParamsPresent = true ;
2223
+
2206
2224
err = tlvReader.Next ();
2207
2225
}
2208
2226
@@ -2212,16 +2230,18 @@ CHIP_ERROR CASESession::ParseSigma1(TLV::ContiguousBufferTLVReader & tlvReader,
2212
2230
if (err == CHIP_NO_ERROR && tlvReader.GetTag () == ContextTag (kResumptionIDTag ))
2213
2231
{
2214
2232
resumptionIDTagFound = true ;
2215
- ReturnErrorOnFailure (tlvReader.GetByteView (resumptionId));
2216
- VerifyOrReturnError (resumptionId.size () == SessionResumptionStorage::kResumptionIdSize , CHIP_ERROR_INVALID_CASE_PARAMETER);
2233
+ ReturnErrorOnFailure (tlvReader.GetByteView (output.resumptionId ));
2234
+ VerifyOrReturnError (output.resumptionId .size () == SessionResumptionStorage::kResumptionIdSize ,
2235
+ CHIP_ERROR_INVALID_CASE_PARAMETER);
2217
2236
err = tlvReader.Next ();
2218
2237
}
2219
2238
2220
2239
if (err == CHIP_NO_ERROR && tlvReader.GetTag () == ContextTag (kResume1MICTag ))
2221
2240
{
2222
2241
resume1MICTagFound = true ;
2223
- ReturnErrorOnFailure (tlvReader.GetByteView (initiatorResumeMIC));
2224
- VerifyOrReturnError (initiatorResumeMIC.size () == CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES, CHIP_ERROR_INVALID_CASE_PARAMETER);
2242
+ ReturnErrorOnFailure (tlvReader.GetByteView (output.initiatorResumeMICSpan ));
2243
+ VerifyOrReturnError (output.initiatorResumeMICSpan .size () == CHIP_CRYPTO_AEAD_MIC_LENGTH_BYTES,
2244
+ CHIP_ERROR_INVALID_CASE_PARAMETER);
2225
2245
err = tlvReader.Next ();
2226
2246
}
2227
2247
@@ -2236,11 +2256,11 @@ CHIP_ERROR CASESession::ParseSigma1(TLV::ContiguousBufferTLVReader & tlvReader,
2236
2256
2237
2257
if (resumptionIDTagFound && resume1MICTagFound)
2238
2258
{
2239
- resumptionRequested = true ;
2259
+ output. sessionResumptionRequested = true ;
2240
2260
}
2241
2261
else if (!resumptionIDTagFound && !resume1MICTagFound)
2242
2262
{
2243
- resumptionRequested = false ;
2263
+ output. sessionResumptionRequested = false ;
2244
2264
}
2245
2265
else
2246
2266
{
0 commit comments