diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 9c6c2811e97159..fc071367bf54a8 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -352,8 +352,8 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio break; case CommissioningStage::kSendOpCertSigningRequest: { NOCChainGenerationParameters nocParams; - nocParams.nocsrElements = report.Get().attestationElements; - nocParams.signature = report.Get().signature; + nocParams.nocsrElements = report.Get().nocsrElements; + nocParams.signature = report.Get().signature; mParams.SetNOCChainGenerationParameters(nocParams); } break; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index c4494192a92b71..11292067bd9c33 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1125,7 +1125,7 @@ void DeviceCommissioner::OnOperationalCertificateSigningRequest( DeviceCommissioner * commissioner = static_cast(context); CommissioningDelegate::CommissioningReport report; - report.Set(AttestationResponse(data.NOCSRElements, data.attestationSignature)); + report.Set(CSRResponse(data.NOCSRElements, data.attestationSignature)); commissioner->CommissioningStageComplete(CHIP_NO_ERROR, report); } diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 04320a0809e99f..b75168a9d47e3e 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -266,6 +266,13 @@ struct AttestationResponse ByteSpan signature; }; +struct CSRResponse +{ + CSRResponse(ByteSpan elements, ByteSpan newSignature) : nocsrElements(elements), signature(newSignature) {} + ByteSpan nocsrElements; + ByteSpan signature; +}; + struct NocChain { NocChain(ByteSpan newNoc, ByteSpan newIcac, ByteSpan newRcac, AesCcm128KeySpan newIpk, NodeId newAdminSubject) : @@ -328,7 +335,7 @@ class CommissioningDelegate { public: virtual ~CommissioningDelegate(){}; - struct CommissioningReport : Variant { CommissioningReport() : stageCompleted(CommissioningStage::kError) {}