|
18 | 18 |
|
19 | 19 | #include "CHIPCommand.h"
|
20 | 20 |
|
21 |
| -#include "IcdManager.h" |
22 |
| - |
23 | 21 | #include <controller/CHIPDeviceControllerFactory.h>
|
24 | 22 | #include <credentials/attestation_verifier/FileAttestationTrustStore.h>
|
25 | 23 | #include <data-model-providers/codegen/Instance.h>
|
@@ -52,10 +50,6 @@ constexpr char kCDTrustStorePathVariable[] = "CAMERACONTROLLER_CD_TRUST_STO
|
52 | 50 |
|
53 | 51 | const chip::Credentials::AttestationTrustStore * CHIPCommand::sTrustStore = nullptr;
|
54 | 52 | chip::Credentials::GroupDataProviderImpl CHIPCommand::sGroupDataProvider{ kMaxGroupsPerFabric, kMaxGroupKeysPerFabric };
|
55 |
| -// All fabrics share the same ICD client storage. |
56 |
| -chip::app::DefaultICDClientStorage CHIPCommand::sICDClientStorage; |
57 |
| -chip::Crypto::RawKeySessionKeystore CHIPCommand::sSessionKeystore; |
58 |
| -chip::app::CheckInHandler CHIPCommand::sCheckInHandler; |
59 | 53 |
|
60 | 54 | namespace {
|
61 | 55 |
|
@@ -109,19 +103,12 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
|
109 | 103 | ReturnLogErrorOnFailure(mOperationalKeystore.Init(&mDefaultStorage));
|
110 | 104 | ReturnLogErrorOnFailure(mOpCertStore.Init(&mDefaultStorage));
|
111 | 105 |
|
112 |
| - // camera-controller uses a non-persistent keystore. |
113 |
| - // ICD storage lifetime is currently tied to the camera-controller's lifetime. Since camera-controller interactive mode is |
114 |
| - // currently used for ICD commissioning and check-in validation, this temporary storage meets the test requirements. |
115 |
| - // TODO: Implement persistent ICD storage for the camera-controller. |
116 |
| - ReturnLogErrorOnFailure(sICDClientStorage.Init(&mDefaultStorage, &sSessionKeystore)); |
117 |
| - |
118 | 106 | chip::Controller::FactoryInitParams factoryInitParams;
|
119 | 107 |
|
120 | 108 | factoryInitParams.fabricIndependentStorage = &mDefaultStorage;
|
121 | 109 | factoryInitParams.operationalKeystore = &mOperationalKeystore;
|
122 | 110 | factoryInitParams.opCertStore = &mOpCertStore;
|
123 | 111 | factoryInitParams.enableServerInteractions = NeedsOperationalAdvertising();
|
124 |
| - factoryInitParams.sessionKeystore = &sSessionKeystore; |
125 | 112 | factoryInitParams.dataModelProvider = chip::app::CodegenDataModelProviderInstance(&mDefaultStorage);
|
126 | 113 |
|
127 | 114 | // Init group data provider that will be used for all group keys and IPKs for the
|
@@ -151,9 +138,6 @@ CHIP_ERROR CHIPCommand::MaybeSetUpStack()
|
151 | 138 |
|
152 | 139 | auto engine = chip::app::InteractionModelEngine::GetInstance();
|
153 | 140 | VerifyOrReturnError(engine != nullptr, CHIP_ERROR_INCORRECT_STATE);
|
154 |
| - ReturnLogErrorOnFailure(IcdManager::Instance().Init(&sICDClientStorage, engine)); |
155 |
| - ReturnLogErrorOnFailure(sCheckInHandler.Init(DeviceControllerFactory::GetInstance().GetSystemState()->ExchangeMgr(), |
156 |
| - &sICDClientStorage, &IcdManager::Instance(), engine)); |
157 | 141 |
|
158 | 142 | CommissionerIdentity nullIdentity{ kIdentityNull, chip::kUndefinedNodeId };
|
159 | 143 | ReturnLogErrorOnFailure(InitializeCommissioner(nullIdentity, kIdentityNullFabricId));
|
@@ -513,8 +497,6 @@ CHIP_ERROR CHIPCommand::InitializeCommissioner(CommissionerIdentity & identity,
|
513 | 497 | chip::Credentials::SetSingleIpkEpochKey(&sGroupDataProvider, fabricIndex, defaultIpk, compressed_fabric_id_span));
|
514 | 498 | }
|
515 | 499 |
|
516 |
| - CHIPCommand::sICDClientStorage.UpdateFabricList(commissioner->GetFabricIndex()); |
517 |
| - |
518 | 500 | mCommissioners[identity] = std::move(commissioner);
|
519 | 501 |
|
520 | 502 | return CHIP_NO_ERROR;
|
|
0 commit comments