From 264525350b02b66019f76abf94fc0700b55d8964 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 20 Oct 2021 11:44:32 -0400 Subject: [PATCH] Don't double-send certs (#10666) When device attestation was added, it added a call to send the operational certs right after device attestatation. This was previously done as a separate stage in the state machine and it was also added as a separate stage after device attestation. This causes the certs to be sent twice. --- src/controller/CHIPDeviceController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index da742b2b380ab0..cd484653feca2b 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1843,8 +1843,7 @@ CommissioningStage DeviceCommissioner::GetNextCommissioningStage() case CommissioningStage::kConfigRegulatory: return CommissioningStage::kDeviceAttestation; case CommissioningStage::kDeviceAttestation: - return CommissioningStage::kCheckCertificates; - case CommissioningStage::kCheckCertificates: + // TODO(cecille): device attestation casues operational cert provisioinging to happen, This should be a separate stage. // For thread and wifi, this should go to network setup then enable. For on-network we can skip right to finding the // operational network because the provisioning of certificates will trigger the device to start operational advertising. #if CHIP_DEVICE_CONFIG_ENABLE_DNSSD @@ -1863,6 +1862,7 @@ CommissioningStage DeviceCommissioner::GetNextCommissioningStage() case CommissioningStage::kNetworkSetup: case CommissioningStage::kNetworkEnable: case CommissioningStage::kScanNetworks: + case CommissioningStage::kCheckCertificates: return CommissioningStage::kError; // Neither of these have a next stage so return kError; case CommissioningStage::kCleanup: