diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index d07ead483e2eee..a7f807b6aebbb2 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -339,8 +339,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().attestationElements; + nocParams.signature = report.Get().signature; mParams.SetNOCChainGenerationParameters(nocParams); } break; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 94898569cbd87b..1b4f429b4586a2 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1135,7 +1135,7 @@ void DeviceCommissioner::OnOperationalCertificateSigningRequest( DeviceCommissioner * commissioner = static_cast(context); CommissioningDelegate::CommissioningReport report; - report.Set(AttestationResponse(data.NOCSRElements, data.attestationSignature)); + report.Set(OpCertResponse(data.NOCSRElements, data.attestationSignature)); commissioner->CommissioningStageComplete(CHIP_NO_ERROR, report); } diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index e5d71e0a55968b..091ae2224de626 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -266,6 +266,15 @@ struct AttestationResponse ByteSpan signature; }; +struct OpCertResponse +{ + OpCertResponse(ByteSpan newAttestationElements, ByteSpan newSignature) : + attestationElements(newAttestationElements), signature(newSignature) + {} + ByteSpan attestationElements; + ByteSpan signature; +}; + struct NocChain { NocChain(ByteSpan newNoc, ByteSpan newIcac, ByteSpan newRcac, AesCcm128KeySpan newIpk, NodeId newAdminSubject) : @@ -324,8 +333,8 @@ class CommissioningDelegate { public: virtual ~CommissioningDelegate(){}; - struct CommissioningReport : Variant + struct CommissioningReport : Variant { CommissioningReport() : stageCompleted(CommissioningStage::kError) {} CommissioningStage stageCompleted;