Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Icd handler #30731

Merged
merged 99 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
e080807
ICDHandler initialization
thivya-amazon Nov 29, 2023
e403ef3
ICDHandler initialization
thivya-amazon Nov 29, 2023
2aeecb5
Restyled by gn
restyled-commits Nov 30, 2023
20b833b
Update src/app/icd/ICDHandler.cpp
thivya-amazon Nov 30, 2023
1c4e530
ICDHandler initialization
thivya-amazon Nov 30, 2023
b520fa9
ICDHandler initialization
thivya-amazon Dec 3, 2023
fb15b18
ICDHandler initialization
thivya-amazon Dec 3, 2023
a8421b8
Restyled by gn
restyled-commits Dec 3, 2023
482d7ff
ICDHandler initialization
thivya-amazon Dec 3, 2023
48aecdb
ICDHandler initialization
thivya-amazon Dec 3, 2023
0f0dbac
Restyled by gn
restyled-commits Dec 3, 2023
bec8bf9
ICDHandler initialization
thivya-amazon Dec 3, 2023
955eaf1
Restyled by gn
restyled-commits Dec 3, 2023
72fec59
ICDHandler initialization
thivya-amazon Dec 3, 2023
03b0e41
ICDHandler initialization
thivya-amazon Dec 3, 2023
5a8209d
ICDHandler initialization
thivya-amazon Dec 3, 2023
bbe4561
ICDHandler initialization
thivya-amazon Dec 3, 2023
8fed72c
ICDHandler initialization
thivya-amazon Dec 3, 2023
f2152fe
Moved counter validation to DefaultICDClientStorage.
thivya-amazon Dec 3, 2023
2af67df
Renamed ICDHandler to CheckInHandler
thivya-amazon Dec 5, 2023
c1fbf04
Included CheckInDelegate in BUILD.gn
thivya-amazon Dec 5, 2023
d2559d7
Restyled by gn
restyled-commits Dec 5, 2023
0ce35c2
Added DefaultCheckInDelegate
thivya-amazon Dec 5, 2023
a3f50e5
Restyled by whitespace
restyled-commits Dec 5, 2023
11693ea
Restyled by gn
restyled-commits Dec 5, 2023
94d4bd7
Modified error codes
thivya-amazon Dec 6, 2023
41ab1ea
Updated variables
thivya-amazon Dec 6, 2023
2834b0f
Added condition for VerifyOrReturnError
thivya-amazon Dec 6, 2023
6b14bc8
Resolve conflicts with master branch
thivya-amazon Dec 6, 2023
7b9cd38
Added CheckInHandler init in chiptool
thivya-amazon Dec 6, 2023
5226d1a
Restyled by clang-format
restyled-commits Dec 6, 2023
f6a7b01
Restyled by gn
restyled-commits Dec 6, 2023
5be52af
Added include file
thivya-amazon Dec 6, 2023
22ad2e6
Modified the access operator
thivya-amazon Dec 6, 2023
d215f5f
Added ICD client deps for tv-casting-app
thivya-amazon Dec 6, 2023
f9c8d58
Restyled by gn
restyled-commits Dec 6, 2023
7159a7c
Added unit test case for ProcessCheckInPayload
thivya-amazon Dec 6, 2023
2c46716
Updated doxygen comments
thivya-amazon Dec 6, 2023
d6b829b
Addressed review comments
thivya-amazon Dec 6, 2023
cd9e91a
Addressed review comments
thivya-amazon Dec 6, 2023
9f19c72
Addressed review comments.
thivya-amazon Dec 6, 2023
440c84f
Moved checkin counter validation to CheckInHandler.
thivya-amazon Dec 7, 2023
9a86075
Removed TestDefaultICDClientStorage from iotsdk.
thivya-amazon Dec 8, 2023
d09f601
Restyled by gn
restyled-commits Dec 8, 2023
d415eec
add CheckInExchangeDispatch to accept unsecure check-in message
yunhanw-google Dec 8, 2023
77f4ec4
Restyled by clang-format
restyled-commits Dec 8, 2023
a1f77d5
Removed DefaultICDClientInfoPersistentStorage.cpp.
thivya-amazon Dec 8, 2023
02a8c5c
Addressed a few review comments.
thivya-amazon Dec 8, 2023
4b94518
Modified a macro to make sure it is taken as a 64-bit interger.
thivya-amazon Dec 8, 2023
2e6d649
Restyled by clang-format
restyled-commits Dec 8, 2023
957c716
Removed redundant error code CHIP_ERROR_DUPLICATE_MESSAGE
thivya-amazon Dec 8, 2023
c2f2c53
Restyled by clang-format
restyled-commits Dec 8, 2023
7975ee2
Modified the datatype for checkInCounter to CounterType from auto.
thivya-amazon Dec 9, 2023
7e0d59a
Added code to refresh key.
thivya-amazon Dec 12, 2023
0404f35
ICDHandler initialization
thivya-amazon Nov 29, 2023
559fb3a
ICDHandler initialization
thivya-amazon Dec 3, 2023
0eec8be
Resolve conflicts with master branch
thivya-amazon Dec 6, 2023
89f7145
Added CheckInHandler init in chiptool
thivya-amazon Dec 6, 2023
fb81b59
Moved checkin counter validation to CheckInHandler.
thivya-amazon Dec 7, 2023
7a84cdc
[icd] integrate ICD management command into CHIP tool (#30863)
erjiaqing Dec 12, 2023
8cf0630
ICDHandler initialization
thivya-amazon Dec 3, 2023
3a85145
Added CheckInHandler init in chiptool
thivya-amazon Dec 6, 2023
4952042
Fixing merge conflicts
thivya-amazon Dec 12, 2023
ec3afd8
Added OnRefreshKey callback
thivya-amazon Dec 12, 2023
ef1541a
Restyled by gn
restyled-commits Dec 12, 2023
168556c
Modified APPDATA_LENGTh macro to inline consexpr variable.
thivya-amazon Dec 12, 2023
524e984
Modified CheckInDelegate and CheckInHandler to static members in chip…
thivya-amazon Dec 13, 2023
6ae6657
Return CHIP_NO_ERROR for failures in processing checkin message.
thivya-amazon Dec 13, 2023
03fe6e9
Merge branch 'master' into ICDHandler
thivya-amazon Dec 13, 2023
ada48e8
Addressed review comments
thivya-amazon Dec 13, 2023
fd779e9
Merge branch 'project-chip:master' into ICDHandler
thivya-amazon Dec 13, 2023
2e4e948
Fixed a spelling error
thivya-amazon Dec 13, 2023
510e39d
Moved variable definition
thivya-amazon Dec 14, 2023
b619180
Reenable TestDefaultClientStorage for open iot.
thivya-amazon Dec 15, 2023
30e705c
Restyled by gn
restyled-commits Dec 15, 2023
bdcac8b
Merge branch 'master' into ICDHandler
thivya-amazon Dec 15, 2023
2f5a35a
Modified code to use updated API
thivya-amazon Dec 15, 2023
0cf1672
Removed obsolete comments
thivya-amazon Dec 15, 2023
56ff8fc
Added comments
thivya-amazon Dec 16, 2023
f68c96b
Addressed review comments
thivya-amazon Dec 18, 2023
6e93fdf
Improve ICDClientStorage (#30931)
yunhanw-google Dec 15, 2023
10dbb2a
Added const qualifier to payload
thivya-amazon Dec 18, 2023
68fab70
Merge branch 'master' into ICDHandler
thivya-amazon Dec 18, 2023
c131254
Return CHIP_NO_ERROR for duplicate check in message and log error.
thivya-amazon Dec 20, 2023
a35887b
Merge branch 'project-chip:master' into ICDHandler
thivya-amazon Dec 20, 2023
5982e39
Return CHIP_NO_ERROR on duplicate checkin messages
thivya-amazon Dec 21, 2023
72a6391
Merge branch 'project-chip:master' into ICDHandler
thivya-amazon Dec 21, 2023
10e61ab
Added OnRefreshKeyRetrieve and addressed review comments
thivya-amazon Dec 29, 2023
fe849c6
Update src/lib/core/CHIPError.h
thivya-amazon Dec 29, 2023
9f6bbf0
Restyled by whitespace
restyled-commits Dec 29, 2023
a3e4b23
Restyled by clang-format
restyled-commits Dec 29, 2023
9843156
Restyled by gn
restyled-commits Dec 29, 2023
96b4d2b
Added a temporary suppression of error for including <unordered_map>
thivya-amazon Dec 29, 2023
0b54b26
Added a comment to suppress Lint error
thivya-amazon Dec 29, 2023
1eba16b
Addressed review comments
thivya-amazon Jan 4, 2024
435ffe6
Addressed review comments
thivya-amazon Jan 5, 2024
6563e97
Addressed review comments.
thivya-amazon Jan 9, 2024
f83002f
Removed code pertaining to key refresh. Will be a separate PR.
thivya-amazon Jan 10, 2024
b51d58d
Added a link to an issue
thivya-amazon Jan 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renamed ICDHandler to CheckInHandler
  • Loading branch information
thivya-amazon committed Dec 12, 2023
commit 2af67dfab5a625dcd23cc717abce8f206fe12906
6 changes: 3 additions & 3 deletions src/app/icd/client/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ source_set("manager") {
}

# ICD Handler source-set is broken out of the main source-set to enable unit tests
# All sources and configurations used by the ICDHandler need to go in this source-set
# All sources and configurations used by the CheckInHandler need to go in this source-set
source_set("handler") {
sources = [
"ICDHandler.cpp",
"ICDHandler.h",
"CheckInHandler.cpp",
"CheckInHandler.h",
]
public_deps = [
":manager",
Expand Down
33 changes: 33 additions & 0 deletions src/app/icd/client/CheckInDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
*
* Copyright (c) 2023 Project CHIP Authors
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

namespace chip {
namespace app {

/// Callbacks for check in protocol
thivya-amazon marked this conversation as resolved.
Show resolved Hide resolved
class DLL_EXPORT CheckInDelegate
{
public:
virtual ~CheckInDelegate() {}
virtual void OnCheckInComplete(void) = 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense.

};

} // namespace app
} // namespace chip
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
*/

#include "ICDHandler.h"
#include "CheckInHandler.h"

#include <cinttypes>

Expand Down Expand Up @@ -85,7 +85,7 @@ CHIP_ERROR CheckInMessageHandler::OnMessageReceived(Messaging::ExchangeContext *
err = mICDClientStorage->ProcessCheckInPayload(payloadByteSpan, clientInfo);
thivya-amazon marked this conversation as resolved.
Show resolved Hide resolved
if (err == CHIP_NO_ERROR)
{
// TODO - Notify checkin complete to the application through callback
OnCheckInComplete();
return err;
}
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/app/icd/client/DefaultICDClientStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ CHIP_ERROR DefaultICDClientStorage::RefreshKeyAndRegisterClient(ICDClientInfo &
chip::Optional<chip::ByteSpan> icdSymmetricKey;
chip::Crypto::DRBG_get_bytes(randomGeneratedICDSymmetricKey, sizeof(randomGeneratedICDSymmetricKey));
icdSymmetricKey.SetValue(ByteSpan(randomGeneratedICDSymmetricKey));
// TODO - Register client with new key and node ID
ReturnErrorOnFailure(SetKey(clientInfo, icdSymmetricKey.Value()));
ReturnErrorOnFailure(StoreEntry(clientInfo));
// TODO - Register client with new key and node ID
return CHIP_NO_ERROR;
yunhanw-google marked this conversation as resolved.
Show resolved Hide resolved
}
} // namespace app
Expand Down