Skip to content

Commit

Permalink
Controller: use generated opcred cluster (#7263)
Browse files Browse the repository at this point in the history
Previously, the clusters were not accessible to the controller so
the opcred clusters were copied in. Now they are accessible so we
should use the generated files.

Test: connected to lighting-app on linux using chip-device-ctrl
      saw connection with successful passing of opcreds.
  • Loading branch information
cecille authored and pull[bot] committed Jul 3, 2021
1 parent 2a168b1 commit 1041868
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 483 deletions.
2 changes: 0 additions & 2 deletions src/controller/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ static_library("controller") {
"CHIPDevice.h",
"CHIPDeviceController.cpp",
"CHIPDeviceController.h",
"CHIPOperationalCredentialsProvisioner.cpp",
"CHIPOperationalCredentialsProvisioner.h",
"DeviceAddressUpdateDelegate.h",
"EmptyDataModelHandler.cpp",
"ExampleOperationalCredentialsIssuer.cpp",
Expand Down
6 changes: 3 additions & 3 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,7 +1112,7 @@ CHIP_ERROR DeviceCommissioner::SendOperationalCertificateSigningRequestCommand(D
{
ChipLogDetail(Controller, "Sending OpCSR request to %p device", device);
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsProvisioner cluster;
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, 0);

Callback::Cancelable * successCallback = mOpCSRResponseCallback.Cancel();
Expand Down Expand Up @@ -1212,7 +1212,7 @@ CHIP_ERROR DeviceCommissioner::ProcessOpCSR(const ByteSpan & CSR, const ByteSpan
CHIP_ERROR DeviceCommissioner::SendOperationalCertificate(Device * device, const ByteSpan & opCertBuf, const ByteSpan & icaCertBuf)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsProvisioner cluster;
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, 0);

Callback::Cancelable * successCallback = mOpCertResponseCallback.Cancel();
Expand Down Expand Up @@ -1289,7 +1289,7 @@ CHIP_ERROR DeviceCommissioner::SendTrustedRootCertificate(Device * device)

ChipLogProgress(Controller, "Sending root certificate to the device");

chip::Controller::TrustedRootCertificatesProvisioner cluster;
chip::Controller::TrustedRootCertificatesCluster cluster;
cluster.Associate(device, 0);

Callback::Cancelable * successCallback = mRootCertResponseCallback.Cancel();
Expand Down
2 changes: 1 addition & 1 deletion src/controller/CHIPDeviceController.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

#include <app/InteractionModelDelegate.h>
#include <controller/CHIPDevice.h>
#include <controller/CHIPOperationalCredentialsProvisioner.h>
#include <controller/OperationalCredentialsDelegate.h>
#include <controller/data_model/gen/CHIPClientCallbacks.h>
#include <core/CHIPCore.h>
#include <core/CHIPPersistentStorageDelegate.h>
#include <core/CHIPTLV.h>
Expand Down
Loading

0 comments on commit 1041868

Please sign in to comment.