From 15082049507742e77a71cad67d0ffc4e332f9cca Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 18 Jan 2023 11:27:01 -0500 Subject: [PATCH] Align naming in Operational Credentials cluster with the spec. (#24472) * Align naming in Operational Credentials cluster with the spec. * Regenerate generated files. --- .../all-clusters-app.matter | 27 +-- .../all-clusters-minimal-app.matter | 27 +-- .../bridge-common/bridge-app.matter | 27 +-- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 27 +-- ...de_colortemperaturelight_hbUnzYVeyn.matter | 27 +-- .../rootnode_contactsensor_lFAGG1bfRO.matter | 27 +-- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 27 +-- .../rootnode_doorlock_aNKYAreMXE.matter | 27 +-- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 27 +-- .../devices/rootnode_fan_7N2TobIlOX.matter | 27 +-- .../rootnode_flowsensor_1zVxHedlaV.matter | 27 +-- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 27 +-- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 27 +-- .../rootnode_lightsensor_lZQycTFcJK.matter | 27 +-- ...rootnode_occupancysensor_iHyVgifZuo.matter | 27 +-- .../rootnode_onofflight_bbs1b7IaOV.matter | 27 +-- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 27 +-- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 27 +-- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 27 +-- .../rootnode_speaker_RpzeXdimqA.matter | 27 +-- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 27 +-- .../rootnode_thermostat_bm3fb8dhYi.matter | 27 +-- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 27 +-- .../interaction_model/DecoderCustomLog.cpp | 2 +- .../contact-sensor-app.matter | 27 +-- .../commands/tests/TestCommandBridge.h | 10 +- .../bridge-common/bridge-app.matter | 27 +-- .../light-switch-app.matter | 27 +-- .../lighting-common/lighting-app.matter | 27 +-- .../nxp/zap/lighting-on-off.matter | 27 +-- examples/lock-app/lock-common/lock-app.matter | 27 +-- .../log-source-common/log-source-app.matter | 27 +-- .../ota-provider-app.matter | 27 +-- .../ota-requestor-app.matter | 27 +-- .../placeholder/linux/apps/app1/config.matter | 50 +++--- .../placeholder/linux/apps/app2/config.matter | 50 +++--- examples/pump-app/pump-common/pump-app.matter | 27 +-- .../pump-controller-app.matter | 27 +-- .../esp32/main/temperature-measurement.matter | 27 +-- .../thermostat-common/thermostat.matter | 27 +-- examples/tv-app/tv-common/tv-app.matter | 54 +++--- .../tv-casting-common/tv-casting-app.matter | 27 +-- examples/window-app/common/window-app.matter | 27 +-- .../operational-credentials-server.cpp | 73 ++++---- src/app/tests/suites/TestArmFailSafe.yaml | 4 +- src/app/tests/suites/TestMultiAdmin.yaml | 2 +- .../certification/Test_TC_CADMIN_1_11.yaml | 12 +- .../certification/Test_TC_CADMIN_1_13.yaml | 12 +- .../certification/Test_TC_CADMIN_1_15.yaml | 16 +- .../certification/Test_TC_CADMIN_1_16.yaml | 16 +- .../certification/Test_TC_CADMIN_1_3.yaml | 4 +- .../certification/Test_TC_CADMIN_1_4.yaml | 4 +- .../commissioner/CommissionerCommands.cpp | 10 +- .../chip/operational-credentials-cluster.xml | 28 ++-- src/controller/CHIPDeviceController.cpp | 40 ++--- src/controller/CHIPDeviceController.h | 3 +- .../data_model/controller-clusters.matter | 27 +-- .../CHIPAttributeTLVValueDecoder.cpp | 56 +++---- .../zap-generated/CHIPInvokeCallbacks.cpp | 12 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 53 +++--- .../java/zap-generated/CHIPReadCallbacks.h | 2 +- .../chip/devicecontroller/ChipClusters.java | 16 +- .../chip/devicecontroller/ChipStructs.java | 36 ++-- .../devicecontroller/ClusterInfoMapping.java | 21 +-- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 46 ++--- .../chip/utils/CommissioningBuildingBlocks.py | 6 +- .../CHIP/templates/availability.yaml | 79 +++++++++ .../MTRAttributeTLVValueDecoder.mm | 10 +- .../CHIP/zap-generated/MTRBaseClusters.h | 46 ++++- .../CHIP/zap-generated/MTRBaseClusters.mm | 5 +- .../CHIP/zap-generated/MTRCallbackBridge.h | 158 +++++++++++++----- .../CHIP/zap-generated/MTRCallbackBridge.mm | 79 +++++++-- .../CHIP/zap-generated/MTRClusters.mm | 5 +- .../zap-generated/MTRCommandPayloadsObjc.h | 16 +- .../zap-generated/MTRCommandPayloadsObjc.mm | 44 ++++- .../CHIP/zap-generated/MTRStructsObjc.h | 23 ++- .../CHIP/zap-generated/MTRStructsObjc.mm | 53 ++++-- .../app-common/zap-generated/callback.h | 3 +- .../zap-generated/cluster-enums-check.h | 18 +- .../app-common/zap-generated/cluster-enums.h | 14 +- .../zap-generated/cluster-objects.cpp | 35 ++-- .../zap-generated/cluster-objects.h | 47 +++--- .../zap-generated/cluster/Commands.h | 2 +- .../cluster/ComplexArgumentParser.cpp | 39 +++-- .../cluster/ComplexArgumentParser.h | 5 +- .../cluster/logging/DataModelLogger.cpp | 18 +- .../cluster/logging/DataModelLogger.h | 5 +- .../chip-tool/zap-generated/test/Commands.h | 116 ++++++------- .../zap-generated/cluster/Commands.h | 7 +- .../zap-generated/test/Commands.h | 78 +++++---- .../zap-generated/CHIPClientCallbacks.h | 2 +- 92 files changed, 1600 insertions(+), 1000 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 453c4a425aaca8..60dcee96599899 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -1577,8 +1577,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1596,17 +1601,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1619,7 +1624,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1649,12 +1654,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1667,7 +1672,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 41265fd93aa923..98845287f96850 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -1422,8 +1422,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1441,17 +1446,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1464,7 +1469,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1494,12 +1499,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1512,7 +1517,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 9a5e0494d24228..5d5c889277e1ff 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -1252,8 +1252,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1271,17 +1276,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1297,7 +1302,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1327,12 +1332,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1345,7 +1350,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 1cc0aa78347c7e..1b36a25668237a 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -1104,8 +1104,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1123,17 +1128,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1146,7 +1151,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1176,12 +1181,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1194,7 +1199,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 1895d3f6b39d6f..41a65b560101dd 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -923,8 +923,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -942,17 +947,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -965,7 +970,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -995,12 +1000,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1013,7 +1018,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index c69ee132add8c0..c0273c715dbac3 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -839,8 +839,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -858,17 +863,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -881,7 +886,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -911,12 +916,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -929,7 +934,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 27653cb1f7f9ad..dc4e9b8436caac 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -988,8 +988,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1007,17 +1012,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1030,7 +1035,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1060,12 +1065,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1078,7 +1083,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index ce5e5271e3d548..56f3be8455f82c 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -839,8 +839,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -858,17 +863,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -881,7 +886,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -911,12 +916,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -929,7 +934,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 21f185e38eedc4..235539e4fdd249 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -988,8 +988,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1007,17 +1012,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1030,7 +1035,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1060,12 +1065,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1078,7 +1083,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 5458817123f751..9020bec3f2ec1b 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -843,8 +843,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -862,17 +867,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -885,7 +890,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -915,12 +920,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -933,7 +938,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 72618cd6321b30..62c4c0b5bd6e7c 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -852,8 +852,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -871,17 +876,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -894,7 +899,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -924,12 +929,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -942,7 +947,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 48469c89fffca6..eb919dbf3f616a 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -981,8 +981,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1000,17 +1005,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1023,7 +1028,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1053,12 +1058,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1071,7 +1076,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index f265729fd104df..0385a52b5eea69 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -852,8 +852,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -871,17 +876,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -894,7 +899,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -924,12 +929,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -942,7 +947,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index db7357e0ee1066..4679c7372cc051 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -852,8 +852,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -871,17 +876,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -894,7 +899,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -924,12 +929,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -942,7 +947,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 0be99f3c8d0c9c..8e0f664bbfb80a 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -852,8 +852,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -871,17 +876,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -894,7 +899,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -924,12 +929,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -942,7 +947,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 59102bd916ab9f..6487d8282734da 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -988,8 +988,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1007,17 +1012,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1030,7 +1035,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1060,12 +1065,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1078,7 +1083,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index a7784c6df29601..bbdb02e112217c 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -931,8 +931,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -950,17 +955,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -973,7 +978,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1003,12 +1008,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1021,7 +1026,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 2c32faa6b37c00..0d0be004b7917a 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -889,8 +889,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -908,17 +913,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -931,7 +936,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -961,12 +966,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -979,7 +984,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 1d12e24554afc5..92465c448d8b6f 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -857,8 +857,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -876,17 +881,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -899,7 +904,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -929,12 +934,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -947,7 +952,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 7ae15fd75b220d..f215a3a2d10768 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -979,8 +979,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -998,17 +1003,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1021,7 +1026,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1051,12 +1056,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1069,7 +1074,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index 2049ec09dfdeac..66d192505a03cf 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -852,8 +852,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -871,17 +876,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -894,7 +899,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -924,12 +929,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -942,7 +947,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 27132a0f02235a..33153dde9206e8 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -839,8 +839,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -858,17 +863,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -881,7 +886,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -911,12 +916,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -929,7 +934,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index 58e6dd7c2391f1..534b4de8d43e99 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -839,8 +839,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -858,17 +863,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -881,7 +886,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -911,12 +916,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -929,7 +934,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp index 47a0b850955da2..f6b014704296ae 100644 --- a/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp +++ b/examples/common/tracing/decoder/interaction_model/DecoderCustomLog.cpp @@ -263,7 +263,7 @@ CHIP_ERROR LogAddTrustedRootCertificateRequest(TLV::TLVReader & reader) app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, value)); - LogCertificate("RCACValue", value.rootCertificate); + LogCertificate("RCACValue", value.rootCACertificate); return CHIP_NO_ERROR; } diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index 098518172743c1..75b9d21d0cc5b0 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -1049,8 +1049,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1068,17 +1073,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1091,7 +1096,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1121,12 +1126,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1139,7 +1144,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h index 7ee409968b1501..52e49ff4abe392 100644 --- a/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h +++ b/examples/darwin-framework-tool/commands/tests/TestCommandBridge.h @@ -589,19 +589,19 @@ NS_ASSUME_NONNULL_BEGIN using namespace chip::app::Clusters::OperationalCredentials; if (CHIP_ERROR_INVALID_PUBLIC_KEY == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidPublicKey)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidPublicKey)); } if (CHIP_ERROR_WRONG_NODE_ID == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidNodeOpId)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNodeOpId)); } if (CHIP_ERROR_UNSUPPORTED_CERT_FORMAT == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidNOC)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNOC)); } if (CHIP_ERROR_FABRIC_EXISTS == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kFabricConflict)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kFabricConflict)); } if (CHIP_ERROR_INVALID_FABRIC_INDEX == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidFabricIndex)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidFabricIndex)); } return StatusIB(err); diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 9a5e0494d24228..5d5c889277e1ff 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -1252,8 +1252,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1271,17 +1276,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1297,7 +1302,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1327,12 +1332,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1345,7 +1350,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index a192969c34f31d..c021fa8d36b790 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -1299,8 +1299,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1318,17 +1323,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1341,7 +1346,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1371,12 +1376,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1389,7 +1394,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 623877d919bb3c..2269e907057c48 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -1250,8 +1250,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1269,17 +1274,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1292,7 +1297,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1322,12 +1327,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1340,7 +1345,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index df1e83a77a9e4a..fe090551eaa8d6 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -1016,8 +1016,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1035,17 +1040,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1058,7 +1063,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1088,12 +1093,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1106,7 +1111,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 4813d33f6da103..1ccc584e38085a 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -1123,8 +1123,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1142,17 +1147,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1165,7 +1170,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1195,12 +1200,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1213,7 +1218,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 543964d22f8683..ae2ba9a7b6b1a6 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -309,8 +309,13 @@ server cluster DiagnosticLogs = 50 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -322,16 +327,16 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -343,7 +348,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -368,12 +373,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -386,7 +391,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index 9fe993dff84b3b..59666de41b3671 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -631,8 +631,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -650,17 +655,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -673,7 +678,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -703,12 +708,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -721,7 +726,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index dd3281754047f5..b4291c96c2ef8d 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -796,8 +796,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -815,17 +820,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -838,7 +843,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -868,12 +873,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -886,7 +891,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 640ed163ffd3cb..b77b029c92ee6b 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1327,8 +1327,13 @@ server cluster AdministratorCommissioning = 60 { } client cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1340,16 +1345,16 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1362,7 +1367,7 @@ client cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1392,7 +1397,7 @@ client cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; @@ -1406,8 +1411,13 @@ client cluster OperationalCredentials = 62 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1419,16 +1429,16 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1441,7 +1451,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1471,12 +1481,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1489,7 +1499,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 161509563a38cd..4aa5878cbcffce 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1304,8 +1304,13 @@ server cluster AdministratorCommissioning = 60 { } client cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1317,16 +1322,16 @@ client cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1339,7 +1344,7 @@ client cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1369,7 +1374,7 @@ client cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; @@ -1383,8 +1388,13 @@ client cluster OperationalCredentials = 62 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1396,16 +1406,16 @@ server cluster OperationalCredentials = 62 { kInvalidFabricIndex = 11; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1418,7 +1428,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1448,12 +1458,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1466,7 +1476,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index baa135f952c490..0037ecdd5a6f51 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -910,8 +910,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -929,17 +934,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -955,7 +960,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -985,12 +990,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1003,7 +1008,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 263c0c8c257d2f..8a9a3ff1b82778 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -809,8 +809,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -828,17 +833,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -854,7 +859,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -884,12 +889,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -902,7 +907,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index 3a70af9fcdc61a..b5add914dd72da 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -644,8 +644,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -663,17 +668,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -686,7 +691,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -716,12 +721,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -734,7 +739,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 754def5c8d2883..978cdba96d9f53 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1203,8 +1203,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1222,17 +1227,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1245,7 +1250,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1275,12 +1280,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1293,7 +1298,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index c0918a5bcfa1b4..c673b4da718947 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -1250,8 +1250,13 @@ server cluster AdministratorCommissioning = 60 { } client cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1269,17 +1274,17 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1292,7 +1297,7 @@ client cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1317,12 +1322,12 @@ client cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1335,7 +1340,7 @@ client cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } @@ -1350,8 +1355,13 @@ client cluster OperationalCredentials = 62 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1369,17 +1379,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1392,7 +1402,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1422,12 +1432,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1440,7 +1450,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 06af5df490777d..1e5f03c0b9f8b8 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -1467,8 +1467,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1486,17 +1491,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1509,7 +1514,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1539,12 +1544,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1557,7 +1562,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index 58e3279f589036..847f0bce021fa5 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -1262,8 +1262,13 @@ server cluster AdministratorCommissioning = 60 { } server cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1281,17 +1286,17 @@ server cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1307,7 +1312,7 @@ server cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1337,12 +1342,12 @@ server cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1355,7 +1360,7 @@ server cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index 7b6bf7f5009b9c..4d12b5bd711a10 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -61,12 +61,12 @@ using namespace chip::Protocols::InteractionModel; namespace { -void SendNOCResponse(app::CommandHandler * commandObj, const ConcreteCommandPath & path, OperationalCertStatus status, +void SendNOCResponse(app::CommandHandler * commandObj, const ConcreteCommandPath & path, NodeOperationalCertStatusEnum status, uint8_t index, const CharSpan & debug_text); -OperationalCertStatus ConvertToNOCResponseStatus(CHIP_ERROR err); +NodeOperationalCertStatusEnum ConvertToNOCResponseStatus(CHIP_ERROR err); -constexpr uint8_t kDACCertificate = 1; -constexpr uint8_t kPAICertificate = 2; +constexpr auto kDACCertificate = CertificateChainTypeEnum::kDACCertificate; +constexpr auto kPAICertificate = CertificateChainTypeEnum::kPAICertificate; CHIP_ERROR CreateAccessControlEntryForNewFabricAdministrator(const Access::SubjectDescriptor & subjectDescriptor, FabricIndex fabricIndex, uint64_t subject) @@ -172,13 +172,13 @@ CHIP_ERROR OperationalCredentialsAttrAccess::ReadFabricsList(EndpointId endpoint for (const auto & fabricInfo : fabricTable) { - Clusters::OperationalCredentials::Structs::FabricDescriptor::Type fabricDescriptor; + Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type fabricDescriptor; FabricIndex fabricIndex = fabricInfo.GetFabricIndex(); fabricDescriptor.fabricIndex = fabricIndex; - fabricDescriptor.nodeId = fabricInfo.GetPeerId().GetNodeId(); - fabricDescriptor.vendorId = fabricInfo.GetVendorId(); - fabricDescriptor.fabricId = fabricInfo.GetFabricId(); + fabricDescriptor.nodeID = fabricInfo.GetPeerId().GetNodeId(); + fabricDescriptor.vendorID = fabricInfo.GetVendorId(); + fabricDescriptor.fabricID = fabricInfo.GetFabricId(); fabricDescriptor.label = fabricInfo.GetFabricLabel(); @@ -434,7 +434,8 @@ bool emberAfOperationalCredentialsClusterRemoveFabricCallback(app::CommandHandle if (err == CHIP_ERROR_NOT_FOUND) { ChipLogError(Zcl, "OpCreds: Failed RemoveFabric due to FabricIndex not found locally"); - SendNOCResponse(commandObj, commandPath, OperationalCertStatus::kInvalidFabricIndex, fabricBeingRemoved, CharSpan()); + SendNOCResponse(commandObj, commandPath, NodeOperationalCertStatusEnum::kInvalidFabricIndex, fabricBeingRemoved, + CharSpan()); } else if (err != CHIP_NO_ERROR) { @@ -446,7 +447,7 @@ bool emberAfOperationalCredentialsClusterRemoveFabricCallback(app::CommandHandle else { ChipLogProgress(Zcl, "OpCreds: RemoveFabric successful"); - SendNOCResponse(commandObj, commandPath, OperationalCertStatus::kSuccess, fabricBeingRemoved, CharSpan()); + SendNOCResponse(commandObj, commandPath, NodeOperationalCertStatusEnum::kOk, fabricBeingRemoved, CharSpan()); chip::Messaging::ExchangeContext * ec = commandObj->GetExchangeContext(); FabricIndex currentFabricIndex = commandObj->GetAccessingFabricIndex(); @@ -487,7 +488,7 @@ bool emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(app::CommandH if (fabricInfo.GetFabricLabel().data_equal(label) && fabricInfo.GetFabricIndex() != ourFabricIndex) { ChipLogError(Zcl, "Fabric label already in use"); - SendNOCResponse(commandObj, commandPath, OperationalCertStatus::kLabelConflict, ourFabricIndex, CharSpan()); + SendNOCResponse(commandObj, commandPath, NodeOperationalCertStatusEnum::kLabelConflict, ourFabricIndex, CharSpan()); return true; } } @@ -507,7 +508,7 @@ bool emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(app::CommandH exit: if (finalStatus == Status::Success) { - SendNOCResponse(commandObj, commandPath, OperationalCertStatus::kSuccess, ourFabricIndex, CharSpan()); + SendNOCResponse(commandObj, commandPath, NodeOperationalCertStatusEnum::kOk, ourFabricIndex, CharSpan()); } else { @@ -518,12 +519,12 @@ bool emberAfOperationalCredentialsClusterUpdateFabricLabelCallback(app::CommandH namespace { -void SendNOCResponse(app::CommandHandler * commandObj, const ConcreteCommandPath & path, OperationalCertStatus status, +void SendNOCResponse(app::CommandHandler * commandObj, const ConcreteCommandPath & path, NodeOperationalCertStatusEnum status, uint8_t index, const CharSpan & debug_text) { Commands::NOCResponse::Type payload; payload.statusCode = status; - if (status == OperationalCertStatus::kSuccess) + if (status == NodeOperationalCertStatusEnum::kOk) { payload.fabricIndex.Emplace(index); } @@ -537,50 +538,50 @@ void SendNOCResponse(app::CommandHandler * commandObj, const ConcreteCommandPath commandObj->AddResponse(path, payload); } -OperationalCertStatus ConvertToNOCResponseStatus(CHIP_ERROR err) +NodeOperationalCertStatusEnum ConvertToNOCResponseStatus(CHIP_ERROR err) { if (err == CHIP_NO_ERROR) { - return OperationalCertStatus::kSuccess; + return NodeOperationalCertStatusEnum::kOk; } if (err == CHIP_ERROR_INVALID_PUBLIC_KEY) { - return OperationalCertStatus::kInvalidPublicKey; + return NodeOperationalCertStatusEnum::kInvalidPublicKey; } if (err == CHIP_ERROR_WRONG_NODE_ID) { - return OperationalCertStatus::kInvalidNodeOpId; + return NodeOperationalCertStatusEnum::kInvalidNodeOpId; } if (err == CHIP_ERROR_UNSUPPORTED_CERT_FORMAT) { - return OperationalCertStatus::kInvalidNOC; + return NodeOperationalCertStatusEnum::kInvalidNOC; } if (err == CHIP_ERROR_WRONG_CERT_DN) { - return OperationalCertStatus::kInvalidNOC; + return NodeOperationalCertStatusEnum::kInvalidNOC; } if (err == CHIP_ERROR_INCORRECT_STATE) { - return OperationalCertStatus::kMissingCsr; + return NodeOperationalCertStatusEnum::kMissingCsr; } if (err == CHIP_ERROR_NO_MEMORY) { - return OperationalCertStatus::kTableFull; + return NodeOperationalCertStatusEnum::kTableFull; } if (err == CHIP_ERROR_FABRIC_EXISTS) { - return OperationalCertStatus::kFabricConflict; + return NodeOperationalCertStatusEnum::kFabricConflict; } if (err == CHIP_ERROR_INVALID_FABRIC_INDEX) { - return OperationalCertStatus::kInvalidFabricIndex; + return NodeOperationalCertStatusEnum::kInvalidFabricIndex; } if (err == CHIP_ERROR_INVALID_ADMIN_SUBJECT) { - return OperationalCertStatus::kInvalidAdminSubject; + return NodeOperationalCertStatusEnum::kInvalidAdminSubject; } - return OperationalCertStatus::kInvalidNOC; + return NodeOperationalCertStatusEnum::kInvalidNOC; } } // namespace @@ -595,7 +596,7 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co auto & adminVendorId = commandData.adminVendorId; auto & ipkValue = commandData.IPKValue; auto * groupDataProvider = Credentials::GetGroupDataProvider(); - auto nocResponse = OperationalCertStatus::kSuccess; + auto nocResponse = NodeOperationalCertStatusEnum::kOk; auto nonDefaultStatus = Status::Success; bool needRevert = false; @@ -628,7 +629,7 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co VerifyOrExit(!failSafeContext.NocCommandHasBeenInvoked(), nonDefaultStatus = Status::ConstraintError); // Must have had a previous CSR request, not tagged for UpdateNOC - VerifyOrExit(hasPendingKey, nocResponse = OperationalCertStatus::kMissingCsr); + VerifyOrExit(hasPendingKey, nocResponse = NodeOperationalCertStatusEnum::kMissingCsr); VerifyOrExit(!csrWasForUpdateNoc, nonDefaultStatus = Status::ConstraintError); // Internal error that would prevent IPK from being added @@ -640,7 +641,7 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co // We can't possibly have a matching root based on the fact that we don't have // a shared root store. Therefore we would later fail path validation due to // missing root. Let's early-bail with InvalidNOC. - VerifyOrExit(failSafeContext.AddTrustedRootCertHasBeenInvoked(), nocResponse = OperationalCertStatus::kInvalidNOC); + VerifyOrExit(failSafeContext.AddTrustedRootCertHasBeenInvoked(), nocResponse = NodeOperationalCertStatusEnum::kInvalidNOC); err = fabricTable.AddNewPendingFabricWithOperationalKeystore(NOCValue, ICACValue.ValueOr(ByteSpan{}), adminVendorId, &newFabricIndex); @@ -736,7 +737,7 @@ bool emberAfOperationalCredentialsClusterAddNOCCallback(app::CommandHandler * co { SendNOCResponse(commandObj, commandPath, nocResponse, newFabricIndex, CharSpan()); // Failed to add NOC - if (nocResponse != OperationalCertStatus::kSuccess) + if (nocResponse != NodeOperationalCertStatusEnum::kOk) { ChipLogError(Zcl, "OpCreds: Failed AddNOC request (err=%" CHIP_ERROR_FORMAT ") with OperationalCert error %d", err.Format(), to_underlying(nocResponse)); @@ -766,7 +767,7 @@ bool emberAfOperationalCredentialsClusterUpdateNOCCallback(app::CommandHandler * auto & NOCValue = commandData.NOCValue; auto & ICACValue = commandData.ICACValue; - auto nocResponse = OperationalCertStatus::kSuccess; + auto nocResponse = NodeOperationalCertStatusEnum::kOk; auto nonDefaultStatus = Status::Success; CHIP_ERROR err = CHIP_NO_ERROR; @@ -790,7 +791,7 @@ bool emberAfOperationalCredentialsClusterUpdateNOCCallback(app::CommandHandler * VerifyOrExit(!failSafeContext.NocCommandHasBeenInvoked(), nonDefaultStatus = Status::ConstraintError); // Must have had a previous CSR request, tagged for UpdateNOC - VerifyOrExit(hasPendingKey, nocResponse = OperationalCertStatus::kMissingCsr); + VerifyOrExit(hasPendingKey, nocResponse = NodeOperationalCertStatusEnum::kMissingCsr); VerifyOrExit(csrWasForUpdateNoc, nonDefaultStatus = Status::ConstraintError); // If current fabric is not available, command was invoked over PASE which is not legal @@ -818,7 +819,7 @@ bool emberAfOperationalCredentialsClusterUpdateNOCCallback(app::CommandHandler * { SendNOCResponse(commandObj, commandPath, nocResponse, fabricIndex, CharSpan()); // Failed to update NOC - if (nocResponse != OperationalCertStatus::kSuccess) + if (nocResponse != NodeOperationalCertStatusEnum::kOk) { ChipLogError(Zcl, "OpCreds: Failed UpdateNOC request (err=%" CHIP_ERROR_FORMAT ") with OperationalCert error %d", err.Format(), to_underlying(nocResponse)); @@ -975,8 +976,8 @@ bool emberAfOperationalCredentialsClusterAttestationRequestCallback(app::Command Commands::AttestationResponse::Type response; - response.attestationElements = attestationElementsSpan; - response.signature = signatureSpan; + response.attestationElements = attestationElementsSpan; + response.attestationSignature = signatureSpan; ChipLogProgress(Zcl, "OpCreds: AttestationRequest successful."); finalStatus = Status::Success; @@ -1142,7 +1143,7 @@ bool emberAfOperationalCredentialsClusterAddTrustedRootCertificateCallback( // logs by the end. We use finalStatus as our overall success marker, not error CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - auto & rootCertificate = commandData.rootCertificate; + auto & rootCertificate = commandData.rootCACertificate; auto & failSafeContext = Server::GetInstance().GetFailSafeContext(); ChipLogProgress(Zcl, "OpCreds: Received an AddTrustedRootCertificate command"); diff --git a/src/app/tests/suites/TestArmFailSafe.yaml b/src/app/tests/suites/TestArmFailSafe.yaml index 4ab62383d6b6d3..d45f5c008848ac 100644 --- a/src/app/tests/suites/TestArmFailSafe.yaml +++ b/src/app/tests/suites/TestArmFailSafe.yaml @@ -36,7 +36,7 @@ tests: cluster: "Operational Credentials" attribute: "Fabrics" response: - value: [{ Label: "", NodeId: nodeId }] + value: [{ Label: "", NodeID: nodeId }] constraints: type: list @@ -66,7 +66,7 @@ tests: cluster: "Operational Credentials" arguments: values: - - name: RootCertificate + - name: RootCACertificate value: "00000000" response: diff --git a/src/app/tests/suites/TestMultiAdmin.yaml b/src/app/tests/suites/TestMultiAdmin.yaml index e8156282e8b739..4603834b5d4915 100644 --- a/src/app/tests/suites/TestMultiAdmin.yaml +++ b/src/app/tests/suites/TestMultiAdmin.yaml @@ -98,7 +98,7 @@ tests: attribute: "Fabrics" fabricFiltered: false response: - value: [{ "NodeId": nodeId }] + value: [{ "NodeID": nodeId }] - label: "Close Commissioning Window after failed commissioning" cluster: "AdministratorCommissioning" diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index 8854f10aaf290c..886481db376132 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -228,9 +228,9 @@ tests: response: value: [ - { Label: "", NodeId: nodeId }, - { Label: "", NodeId: nodeId3 }, - { Label: "", NodeId: nodeId2 }, + { Label: "", NodeID: nodeId }, + { Label: "", NodeID: nodeId3 }, + { Label: "", NodeID: nodeId2 }, ] constraints: type: list @@ -315,9 +315,9 @@ tests: response: value: [ - { Label: "", NodeId: nodeId }, - { Label: "", NodeId: nodeId3 }, - { Label: "", NodeId: nodeId2 }, + { Label: "", NodeID: nodeId }, + { Label: "", NodeID: nodeId3 }, + { Label: "", NodeID: nodeId2 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 7c1841955ed161..d7be6a30a4324e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -300,9 +300,9 @@ tests: response: value: [ - { Label: "", NodeId: nodeId }, - { Label: "", NodeId: nodeId2 }, - { Label: "", NodeId: nodeId3 }, + { Label: "", NodeID: nodeId }, + { Label: "", NodeID: nodeId2 }, + { Label: "", NodeID: nodeId3 }, ] constraints: type: list @@ -402,9 +402,9 @@ tests: response: value: [ - { Label: "", NodeId: nodeId }, - { Label: "", NodeId: nodeId2 }, - { Label: "", NodeId: nodeId3 }, + { Label: "", NodeID: nodeId }, + { Label: "", NodeID: nodeId2 }, + { Label: "", NodeID: nodeId3 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 17f77d3a3274ec..9bf61682fbf04a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -159,9 +159,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 2, NodeId: nodeId2 }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 2, NodeID: nodeId2 }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list @@ -222,8 +222,8 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list @@ -309,9 +309,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 4, NodeId: nodeId2 }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 4, NodeID: nodeId2 }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index eed27eb63d6548..67ba737a677130 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -141,9 +141,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 2, NodeId: nodeId2 }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 2, NodeID: nodeId2 }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list @@ -204,8 +204,8 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list @@ -253,9 +253,9 @@ tests: response: value: [ - { Label: "", FabricIndex: 1, NodeId: nodeId }, - { Label: "", FabricIndex: 4, NodeId: nodeId2 }, - { Label: "", FabricIndex: 3, NodeId: nodeId3 }, + { Label: "", FabricIndex: 1, NodeID: nodeId }, + { Label: "", FabricIndex: 4, NodeID: nodeId2 }, + { Label: "", FabricIndex: 3, NodeID: nodeId3 }, ] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index 3538085ce68314..ef066738f9ff4b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -187,7 +187,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] + value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] constraints: type: list @@ -199,7 +199,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] + value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index dd452dca5993f2..8b47aa85724201 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -174,7 +174,7 @@ tests: attribute: "Fabrics" fabricFiltered: false response: - value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] + value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] constraints: type: list @@ -186,7 +186,7 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", NodeId: nodeId }, { Label: "", NodeId: nodeId2 }] + value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] constraints: type: list diff --git a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp b/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp index e01c8e2668e941..1d402e76e09e97 100644 --- a/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp +++ b/src/app/tests/suites/commands/commissioner/CommissionerCommands.cpp @@ -54,23 +54,23 @@ chip::app::StatusIB ConvertToStatusIB(CHIP_ERROR err) if (CHIP_ERROR_INVALID_PUBLIC_KEY == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidPublicKey)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidPublicKey)); } if (CHIP_ERROR_WRONG_NODE_ID == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidNodeOpId)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNodeOpId)); } if (CHIP_ERROR_UNSUPPORTED_CERT_FORMAT == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidNOC)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidNOC)); } if (CHIP_ERROR_FABRIC_EXISTS == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kFabricConflict)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kFabricConflict)); } if (CHIP_ERROR_INVALID_FABRIC_INDEX == err) { - return StatusIB(Status::Failure, to_underlying(OperationalCertStatus::kInvalidFabricIndex)); + return StatusIB(Status::Failure, to_underlying(NodeOperationalCertStatusEnum::kInvalidFabricIndex)); } return StatusIB(err); diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml index c99a3def7eeca8..f410d30b9796f5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-credentials-cluster.xml @@ -17,18 +17,18 @@ limitations under the License. - + - - - + + + - + - + @@ -46,6 +46,12 @@ limitations under the License. + + + + + + General Operational Credentials @@ -57,7 +63,7 @@ limitations under the License. NOCs - Fabrics + Fabrics SupportedFabrics CommissionedFabrics TrustedRootCertificates @@ -72,12 +78,12 @@ limitations under the License. An attestation information confirmation from the server. - + Sender is requesting a device attestation certificate from the receiver. - + @@ -119,7 +125,7 @@ limitations under the License. Response to AddNOC or UpdateNOC commands. - + @@ -138,7 +144,7 @@ limitations under the License. This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. - + diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 0078452abb5067..12b2fe80ea87b9 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -968,7 +968,7 @@ CHIP_ERROR DeviceCommissioner::SendCertificateChainRequestCommand(DeviceProxy * VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); OperationalCredentials::Commands::CertificateChainRequest::Type request; - request.certificateType = certificateType; + request.certificateType = static_cast(certificateType); return SendCommand(device, request, OnCertificateChainResponse, OnCertificateChainFailureResponse, timeout); @@ -1028,7 +1028,7 @@ void DeviceCommissioner::OnAttestationResponse(void * context, DeviceCommissioner * commissioner = reinterpret_cast(context); CommissioningDelegate::CommissioningReport report; - report.Set(AttestationResponse(data.attestationElements, data.signature)); + report.Set(AttestationResponse(data.attestationElements, data.attestationSignature)); commissioner->CommissioningStageComplete(CHIP_NO_ERROR, report); } @@ -1348,32 +1348,32 @@ CHIP_ERROR DeviceCommissioner::SendOperationalCertificate(DeviceProxy * device, return CHIP_NO_ERROR; } -CHIP_ERROR DeviceCommissioner::ConvertFromOperationalCertStatus(OperationalCredentials::OperationalCertStatus err) +CHIP_ERROR DeviceCommissioner::ConvertFromOperationalCertStatus(OperationalCredentials::NodeOperationalCertStatusEnum err) { - using OperationalCredentials::OperationalCertStatus; + using OperationalCredentials::NodeOperationalCertStatusEnum; switch (err) { - case OperationalCertStatus::kSuccess: + case NodeOperationalCertStatusEnum::kOk: return CHIP_NO_ERROR; - case OperationalCertStatus::kInvalidPublicKey: + case NodeOperationalCertStatusEnum::kInvalidPublicKey: return CHIP_ERROR_INVALID_PUBLIC_KEY; - case OperationalCertStatus::kInvalidNodeOpId: + case NodeOperationalCertStatusEnum::kInvalidNodeOpId: return CHIP_ERROR_WRONG_NODE_ID; - case OperationalCertStatus::kInvalidNOC: + case NodeOperationalCertStatusEnum::kInvalidNOC: return CHIP_ERROR_UNSUPPORTED_CERT_FORMAT; - case OperationalCertStatus::kMissingCsr: + case NodeOperationalCertStatusEnum::kMissingCsr: return CHIP_ERROR_INCORRECT_STATE; - case OperationalCertStatus::kTableFull: + case NodeOperationalCertStatusEnum::kTableFull: return CHIP_ERROR_NO_MEMORY; - case OperationalCertStatus::kInvalidAdminSubject: + case NodeOperationalCertStatusEnum::kInvalidAdminSubject: return CHIP_ERROR_INVALID_ADMIN_SUBJECT; - case OperationalCertStatus::kFabricConflict: + case NodeOperationalCertStatusEnum::kFabricConflict: return CHIP_ERROR_FABRIC_EXISTS; - case OperationalCertStatus::kLabelConflict: + case NodeOperationalCertStatusEnum::kLabelConflict: return CHIP_ERROR_INVALID_ARGUMENT; - case OperationalCertStatus::kInvalidFabricIndex: + case NodeOperationalCertStatusEnum::kInvalidFabricIndex: return CHIP_ERROR_INVALID_FABRIC_INDEX; - case OperationalCertStatus::kUnknownEnumValue: + case NodeOperationalCertStatusEnum::kUnknownEnumValue: // Is this a reasonable value? return CHIP_ERROR_CERT_LOAD_FAILED; } @@ -1424,7 +1424,7 @@ CHIP_ERROR DeviceCommissioner::SendTrustedRootCertificate(DeviceProxy * device, ChipLogProgress(Controller, "Sending root certificate to the device"); OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - request.rootCertificate = rcac; + request.rootCACertificate = rcac; ReturnErrorOnFailure( SendCommand(device, request, OnRootCertSuccessResponse, OnRootCertFailureResponse, timeout)); @@ -1829,9 +1829,9 @@ void DeviceCommissioner::OnDone(app::ReadClient *) ChipLogProgress(Controller, "DeviceCommissioner::OnDone - fabric.vendorId=0x%04X fabric.fabricId=0x" ChipLogFormatX64 " fabric.nodeId=0x" ChipLogFormatX64, - fabricDescriptor.vendorId, ChipLogValueX64(fabricDescriptor.fabricId), - ChipLogValueX64(fabricDescriptor.nodeId)); - if (GetFabricId() == fabricDescriptor.fabricId) + fabricDescriptor.vendorID, ChipLogValueX64(fabricDescriptor.fabricID), + ChipLogValueX64(fabricDescriptor.nodeID)); + if (GetFabricId() == fabricDescriptor.fabricID) { ChipLogProgress(Controller, "DeviceCommissioner::OnDone - found a matching fabric id"); chip::ByteSpan rootKeySpan = fabricDescriptor.rootPublicKey; @@ -1853,7 +1853,7 @@ void DeviceCommissioner::OnDone(app::ReadClient *) else if (commissionerRootPublicKey.Matches(deviceRootPublicKey)) { ChipLogProgress(Controller, "DeviceCommissioner::OnDone - fabric root keys match"); - info.nodeId = fabricDescriptor.nodeId; + info.nodeId = fabricDescriptor.nodeID; } } } diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index b3c1eab9c1161d..43007178b55609 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -880,7 +880,8 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, return cluster.InvokeCommand(request, this, successCb, failureCb); } - static CHIP_ERROR ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::OperationalCertStatus err); + static CHIP_ERROR + ConvertFromOperationalCertStatus(chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum err); // Sends commissioning complete callbacks to the delegate depending on the status. Sends // OnCommissioningComplete and either OnCommissioningSuccess or OnCommissioningFailure depending on the given completion status. diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index b1e3ad5159902b..f6a67bc58d9a60 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1808,8 +1808,13 @@ client cluster AdministratorCommissioning = 60 { } client cluster OperationalCredentials = 62 { - enum OperationalCertStatus : ENUM8 { - kSuccess = 0; + enum CertificateChainTypeEnum : ENUM8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : ENUM8 { + kOk = 0; kInvalidPublicKey = 1; kInvalidNodeOpId = 2; kInvalidNOC = 3; @@ -1827,17 +1832,17 @@ client cluster OperationalCredentials = 62 { fabric_idx fabricIndex = 254; } - fabric_scoped struct FabricDescriptor { + fabric_scoped struct FabricDescriptorStruct { octet_string<65> rootPublicKey = 1; - vendor_id vendorId = 2; - fabric_id fabricId = 3; - node_id nodeId = 4; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; char_string<32> label = 5; fabric_idx fabricIndex = 254; } readonly attribute access(read: administer) NOCStruct NOCs[] = 0; - readonly attribute FabricDescriptor fabrics[] = 1; + readonly attribute FabricDescriptorStruct fabrics[] = 1; readonly attribute int8u supportedFabrics = 2; readonly attribute int8u commissionedFabrics = 3; readonly attribute OCTET_STRING trustedRootCertificates[] = 4; @@ -1853,7 +1858,7 @@ client cluster OperationalCredentials = 62 { } request struct CertificateChainRequestRequest { - INT8U certificateType = 0; + CertificateChainTypeEnum certificateType = 0; } request struct CSRRequestRequest { @@ -1883,12 +1888,12 @@ client cluster OperationalCredentials = 62 { } request struct AddTrustedRootCertificateRequest { - OCTET_STRING rootCertificate = 0; + OCTET_STRING rootCACertificate = 0; } response struct AttestationResponse = 1 { OCTET_STRING attestationElements = 0; - OCTET_STRING signature = 1; + OCTET_STRING attestationSignature = 1; } response struct CertificateChainResponse = 3 { @@ -1901,7 +1906,7 @@ client cluster OperationalCredentials = 62 { } response struct NOCResponse = 8 { - OperationalCertStatus statusCode = 0; + NodeOperationalCertStatusEnum statusCode = 0; optional fabric_idx fabricIndex = 1; optional CHAR_STRING debugText = 2; } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index f4d292b1b50610..06b3403f5966cb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -8345,24 +8345,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), reinterpret_cast(entry_0.rootPublicKey.data())); newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; - jobject newElement_0_vendorId; - std::string newElement_0_vendorIdClassName = "java/lang/Integer"; - std::string newElement_0_vendorIdCtorSignature = "(I)V"; + jobject newElement_0_vendorID; + std::string newElement_0_vendorIDClassName = "java/lang/Integer"; + std::string newElement_0_vendorIDCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_vendorIdClassName.c_str(), newElement_0_vendorIdCtorSignature.c_str(), - static_cast(entry_0.vendorId), newElement_0_vendorId); - jobject newElement_0_fabricId; - std::string newElement_0_fabricIdClassName = "java/lang/Long"; - std::string newElement_0_fabricIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIdClassName.c_str(), - newElement_0_fabricIdCtorSignature.c_str(), - entry_0.fabricId, newElement_0_fabricId); - jobject newElement_0_nodeId; - std::string newElement_0_nodeIdClassName = "java/lang/Long"; - std::string newElement_0_nodeIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIdClassName.c_str(), - newElement_0_nodeIdCtorSignature.c_str(), - entry_0.nodeId, newElement_0_nodeId); + newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), + static_cast(entry_0.vendorID), newElement_0_vendorID); + jobject newElement_0_fabricID; + std::string newElement_0_fabricIDClassName = "java/lang/Long"; + std::string newElement_0_fabricIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), + entry_0.fabricID, newElement_0_fabricID); + jobject newElement_0_nodeID; + std::string newElement_0_nodeIDClassName = "java/lang/Long"; + std::string newElement_0_nodeIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_nodeIDClassName.c_str(), + newElement_0_nodeIDCtorSignature.c_str(), + entry_0.nodeID, newElement_0_nodeID); jobject newElement_0_label; newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); jobject newElement_0_fabricIndex; @@ -8372,27 +8372,27 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass fabricDescriptorStructClass_1; + jclass fabricDescriptorStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptor", - fabricDescriptorStructClass_1); + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", + fabricDescriptorStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptor"); + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); return nullptr; } - jmethodID fabricDescriptorStructCtor_1 = env->GetMethodID( - fabricDescriptorStructClass_1, "", + jmethodID fabricDescriptorStructStructCtor_1 = env->GetMethodID( + fabricDescriptorStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V"); - if (fabricDescriptorStructCtor_1 == nullptr) + if (fabricDescriptorStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptor constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(fabricDescriptorStructClass_1, fabricDescriptorStructCtor_1, - newElement_0_rootPublicKey, newElement_0_vendorId, newElement_0_fabricId, - newElement_0_nodeId, newElement_0_label, newElement_0_fabricIndex); + newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, + newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, + newElement_0_nodeID, newElement_0_label, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index a055b67cc3fa57..0da0bfa0ab2f95 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -1867,13 +1867,13 @@ void CHIPOperationalCredentialsClusterAttestationResponseCallback::CallbackFn( env->SetByteArrayRegion(AttestationElementsByteArray, 0, static_cast(dataResponse.attestationElements.size()), reinterpret_cast(dataResponse.attestationElements.data())); AttestationElements = AttestationElementsByteArray; - jobject Signature; - jbyteArray SignatureByteArray = env->NewByteArray(static_cast(dataResponse.signature.size())); - env->SetByteArrayRegion(SignatureByteArray, 0, static_cast(dataResponse.signature.size()), - reinterpret_cast(dataResponse.signature.data())); - Signature = SignatureByteArray; + jobject AttestationSignature; + jbyteArray AttestationSignatureByteArray = env->NewByteArray(static_cast(dataResponse.attestationSignature.size())); + env->SetByteArrayRegion(AttestationSignatureByteArray, 0, static_cast(dataResponse.attestationSignature.size()), + reinterpret_cast(dataResponse.attestationSignature.data())); + AttestationSignature = AttestationSignatureByteArray; - env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, Signature); + env->CallVoidMethod(javaCallbackRef, javaMethod, AttestationElements, AttestationSignature); } CHIPOperationalCredentialsClusterCertificateChainResponseCallback:: CHIPOperationalCredentialsClusterCertificateChainResponseCallback(jobject javaCallback) : diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index f0932f7101cbfb..9a5ba6344a369a 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -12775,7 +12775,7 @@ CHIPOperationalCredentialsFabricsAttributeCallback::~CHIPOperationalCredentialsF void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list) + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -12809,23 +12809,23 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( env->SetByteArrayRegion(newElement_0_rootPublicKeyByteArray, 0, static_cast(entry_0.rootPublicKey.size()), reinterpret_cast(entry_0.rootPublicKey.data())); newElement_0_rootPublicKey = newElement_0_rootPublicKeyByteArray; - jobject newElement_0_vendorId; - std::string newElement_0_vendorIdClassName = "java/lang/Integer"; - std::string newElement_0_vendorIdCtorSignature = "(I)V"; + jobject newElement_0_vendorID; + std::string newElement_0_vendorIDClassName = "java/lang/Integer"; + std::string newElement_0_vendorIDCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_vendorIdClassName.c_str(), newElement_0_vendorIdCtorSignature.c_str(), - static_cast(entry_0.vendorId), newElement_0_vendorId); - jobject newElement_0_fabricId; - std::string newElement_0_fabricIdClassName = "java/lang/Long"; - std::string newElement_0_fabricIdCtorSignature = "(J)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIdClassName.c_str(), - newElement_0_fabricIdCtorSignature.c_str(), entry_0.fabricId, - newElement_0_fabricId); - jobject newElement_0_nodeId; - std::string newElement_0_nodeIdClassName = "java/lang/Long"; - std::string newElement_0_nodeIdCtorSignature = "(J)V"; + newElement_0_vendorIDClassName.c_str(), newElement_0_vendorIDCtorSignature.c_str(), + static_cast(entry_0.vendorID), newElement_0_vendorID); + jobject newElement_0_fabricID; + std::string newElement_0_fabricIDClassName = "java/lang/Long"; + std::string newElement_0_fabricIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_fabricIDClassName.c_str(), + newElement_0_fabricIDCtorSignature.c_str(), entry_0.fabricID, + newElement_0_fabricID); + jobject newElement_0_nodeID; + std::string newElement_0_nodeIDClassName = "java/lang/Long"; + std::string newElement_0_nodeIDCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_0_nodeIdClassName.c_str(), newElement_0_nodeIdCtorSignature.c_str(), entry_0.nodeId, newElement_0_nodeId); + newElement_0_nodeIDClassName.c_str(), newElement_0_nodeIDCtorSignature.c_str(), entry_0.nodeID, newElement_0_nodeID); jobject newElement_0_label; newElement_0_label = env->NewStringUTF(std::string(entry_0.label.data(), entry_0.label.size()).c_str()); jobject newElement_0_fabricIndex; @@ -12835,26 +12835,27 @@ void CHIPOperationalCredentialsFabricsAttributeCallback::CallbackFn( newElement_0_fabricIndexCtorSignature.c_str(), entry_0.fabricIndex, newElement_0_fabricIndex); - jclass fabricDescriptorStructClass_1; + jclass fabricDescriptorStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptor", fabricDescriptorStructClass_1); + env, "chip/devicecontroller/ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct", + fabricDescriptorStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptor"); + ChipLogError(Zcl, "Could not find class ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct"); return; } - jmethodID fabricDescriptorStructCtor_1 = - env->GetMethodID(fabricDescriptorStructClass_1, "", + jmethodID fabricDescriptorStructStructCtor_1 = + env->GetMethodID(fabricDescriptorStructStructClass_1, "", "([BLjava/lang/Integer;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/String;Ljava/lang/Integer;)V"); - if (fabricDescriptorStructCtor_1 == nullptr) + if (fabricDescriptorStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptor constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$OperationalCredentialsClusterFabricDescriptorStruct constructor"); return; } - newElement_0 = env->NewObject(fabricDescriptorStructClass_1, fabricDescriptorStructCtor_1, newElement_0_rootPublicKey, - newElement_0_vendorId, newElement_0_fabricId, newElement_0_nodeId, newElement_0_label, - newElement_0_fabricIndex); + newElement_0 = env->NewObject(fabricDescriptorStructStructClass_1, fabricDescriptorStructStructCtor_1, + newElement_0_rootPublicKey, newElement_0_vendorID, newElement_0_fabricID, newElement_0_nodeID, + newElement_0_label, newElement_0_fabricIndex); chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 84c78b2432debf..a82af3a768ddcc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -5312,7 +5312,7 @@ class CHIPOperationalCredentialsFabricsAttributeCallback static void CallbackFn(void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & list); + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & list); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 5b3e258863515c..03e29e55e417cb 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -10059,13 +10059,14 @@ public void removeFabric( removeFabric(chipClusterPtr, callback, fabricIndex, timedInvokeTimeoutMs); } - public void addTrustedRootCertificate(DefaultClusterCallback callback, byte[] rootCertificate) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, null); + public void addTrustedRootCertificate( + DefaultClusterCallback callback, byte[] rootCACertificate) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, null); } public void addTrustedRootCertificate( - DefaultClusterCallback callback, byte[] rootCertificate, int timedInvokeTimeoutMs) { - addTrustedRootCertificate(chipClusterPtr, callback, rootCertificate, timedInvokeTimeoutMs); + DefaultClusterCallback callback, byte[] rootCACertificate, int timedInvokeTimeoutMs) { + addTrustedRootCertificate(chipClusterPtr, callback, rootCACertificate, timedInvokeTimeoutMs); } private native void attestationRequest( @@ -10119,11 +10120,11 @@ private native void removeFabric( private native void addTrustedRootCertificate( long chipClusterPtr, DefaultClusterCallback Callback, - byte[] rootCertificate, + byte[] rootCACertificate, @Nullable Integer timedInvokeTimeoutMs); public interface AttestationResponseCallback { - void onSuccess(byte[] attestationElements, byte[] signature); + void onSuccess(byte[] attestationElements, byte[] attestationSignature); void onError(Exception error); } @@ -10155,7 +10156,8 @@ default void onSubscriptionEstablished() {} } public interface FabricsAttributeCallback { - void onSuccess(List valueList); + void onSuccess( + List valueList); void onError(Exception ex); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index 87079f933b5ee2..b6fc1d33b30102 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -1004,25 +1004,25 @@ public String toString() { } } - public static class OperationalCredentialsClusterFabricDescriptor { + public static class OperationalCredentialsClusterFabricDescriptorStruct { public byte[] rootPublicKey; - public Integer vendorId; - public Long fabricId; - public Long nodeId; + public Integer vendorID; + public Long fabricID; + public Long nodeID; public String label; public Integer fabricIndex; - public OperationalCredentialsClusterFabricDescriptor( + public OperationalCredentialsClusterFabricDescriptorStruct( byte[] rootPublicKey, - Integer vendorId, - Long fabricId, - Long nodeId, + Integer vendorID, + Long fabricID, + Long nodeID, String label, Integer fabricIndex) { this.rootPublicKey = rootPublicKey; - this.vendorId = vendorId; - this.fabricId = fabricId; - this.nodeId = nodeId; + this.vendorID = vendorID; + this.fabricID = fabricID; + this.nodeID = nodeID; this.label = label; this.fabricIndex = fabricIndex; } @@ -1030,18 +1030,18 @@ public OperationalCredentialsClusterFabricDescriptor( @Override public String toString() { StringBuilder output = new StringBuilder(); - output.append("OperationalCredentialsClusterFabricDescriptor {\n"); + output.append("OperationalCredentialsClusterFabricDescriptorStruct {\n"); output.append("\trootPublicKey: "); output.append(Arrays.toString(rootPublicKey)); output.append("\n"); - output.append("\tvendorId: "); - output.append(vendorId); + output.append("\tvendorID: "); + output.append(vendorID); output.append("\n"); - output.append("\tfabricId: "); - output.append(fabricId); + output.append("\tfabricID: "); + output.append(fabricID); output.append("\n"); - output.append("\tnodeId: "); - output.append(nodeId); + output.append("\tnodeID: "); + output.append(nodeID); output.append("\n"); output.append("\tlabel: "); output.append(label); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 856a82753c38a3..4a30a6afdeca7a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -3403,13 +3403,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(byte[] AttestationElements, byte[] Signature) { + public void onSuccess(byte[] AttestationElements, byte[] AttestationSignature) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo AttestationElementsResponseValue = new CommandResponseInfo("AttestationElements", "byte[]"); responseValues.put(AttestationElementsResponseValue, AttestationElements); - CommandResponseInfo SignatureResponseValue = new CommandResponseInfo("Signature", "byte[]"); - responseValues.put(SignatureResponseValue, Signature); + CommandResponseInfo AttestationSignatureResponseValue = + new CommandResponseInfo("AttestationSignature", "byte[]"); + responseValues.put(AttestationSignatureResponseValue, AttestationSignature); callback.onSuccess(responseValues); } @@ -3542,11 +3543,11 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( - List valueList) { + List valueList) { Map responseValues = new LinkedHashMap<>(); CommandResponseInfo commandResponseInfo = new CommandResponseInfo( - "valueList", "List"); + "valueList", "List"); responseValues.put(commandResponseInfo, valueList); callback.onSuccess(responseValues); } @@ -9567,11 +9568,11 @@ public Map> getCommandMap() { Map operationalCredentialsaddTrustedRootCertificateCommandParams = new LinkedHashMap(); CommandParameterInfo - operationalCredentialsaddTrustedRootCertificaterootCertificateCommandParameterInfo = - new CommandParameterInfo("rootCertificate", byte[].class, byte[].class); + operationalCredentialsaddTrustedRootCertificaterootCACertificateCommandParameterInfo = + new CommandParameterInfo("rootCACertificate", byte[].class, byte[].class); operationalCredentialsaddTrustedRootCertificateCommandParams.put( - "rootCertificate", - operationalCredentialsaddTrustedRootCertificaterootCertificateCommandParameterInfo); + "rootCACertificate", + operationalCredentialsaddTrustedRootCertificaterootCACertificateCommandParameterInfo); InteractionInfo operationalCredentialsaddTrustedRootCertificateInteractionInfo = new InteractionInfo( @@ -9579,7 +9580,7 @@ public Map> getCommandMap() { ((ChipClusters.OperationalCredentialsCluster) cluster) .addTrustedRootCertificate( (DefaultClusterCallback) callback, - (byte[]) commandArguments.get("rootCertificate")); + (byte[]) commandArguments.get("rootCACertificate")); }, () -> new DelegatedDefaultClusterCallback(), operationalCredentialsaddTrustedRootCertificateCommandParams); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index f06a025be33dd4..01388eb8a17d47 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3154,7 +3154,7 @@ class ChipClusters: "commandId": 0x0000000B, "commandName": "AddTrustedRootCertificate", "args": { - "rootCertificate": "bytes", + "rootCACertificate": "bytes", }, }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index e5ef76386dab26..214713eecc848d 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -11466,7 +11466,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="NOCs", Tag=0x00000000, Type=typing.List[OperationalCredentials.Structs.NOCStruct]), - ClusterObjectFieldDescriptor(Label="fabrics", Tag=0x00000001, Type=typing.List[OperationalCredentials.Structs.FabricDescriptor]), + ClusterObjectFieldDescriptor(Label="fabrics", Tag=0x00000001, Type=typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]), ClusterObjectFieldDescriptor(Label="supportedFabrics", Tag=0x00000002, Type=uint), ClusterObjectFieldDescriptor(Label="commissionedFabrics", Tag=0x00000003, Type=uint), ClusterObjectFieldDescriptor(Label="trustedRootCertificates", Tag=0x00000004, Type=typing.List[bytes]), @@ -11479,7 +11479,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) NOCs: 'typing.List[OperationalCredentials.Structs.NOCStruct]' = None - fabrics: 'typing.List[OperationalCredentials.Structs.FabricDescriptor]' = None + fabrics: 'typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]' = None supportedFabrics: 'uint' = None commissionedFabrics: 'uint' = None trustedRootCertificates: 'typing.List[bytes]' = None @@ -11491,8 +11491,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: clusterRevision: 'uint' = None class Enums: - class OperationalCertStatus(IntEnum): - kSuccess = 0x00 + class CertificateChainTypeEnum(IntEnum): + kDACCertificate = 0x01 + kPAICertificate = 0x02 + + class NodeOperationalCertStatusEnum(IntEnum): + kOk = 0x00 kInvalidPublicKey = 0x01 kInvalidNodeOpId = 0x02 kInvalidNOC = 0x03 @@ -11506,23 +11510,23 @@ class OperationalCertStatus(IntEnum): class Structs: @dataclass - class FabricDescriptor(ClusterObject): + class FabricDescriptorStruct(ClusterObject): @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="rootPublicKey", Tag=1, Type=bytes), - ClusterObjectFieldDescriptor(Label="vendorId", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="fabricId", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="nodeId", Tag=4, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="fabricID", Tag=3, Type=uint), + ClusterObjectFieldDescriptor(Label="nodeID", Tag=4, Type=uint), ClusterObjectFieldDescriptor(Label="label", Tag=5, Type=str), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) rootPublicKey: 'bytes' = b"" - vendorId: 'uint' = 0 - fabricId: 'uint' = 0 - nodeId: 'uint' = 0 + vendorID: 'uint' = 0 + fabricID: 'uint' = 0 + nodeID: 'uint' = 0 label: 'str' = "" fabricIndex: 'uint' = 0 @@ -11572,11 +11576,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="attestationElements", Tag=0, Type=bytes), - ClusterObjectFieldDescriptor(Label="signature", Tag=1, Type=bytes), + ClusterObjectFieldDescriptor(Label="attestationSignature", Tag=1, Type=bytes), ]) attestationElements: 'bytes' = b"" - signature: 'bytes' = b"" + attestationSignature: 'bytes' = b"" @dataclass class CertificateChainRequest(ClusterCommand): @@ -11589,10 +11593,10 @@ class CertificateChainRequest(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="certificateType", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="certificateType", Tag=0, Type=OperationalCredentials.Enums.CertificateChainTypeEnum), ]) - certificateType: 'uint' = 0 + certificateType: 'OperationalCredentials.Enums.CertificateChainTypeEnum' = 0 @dataclass class CertificateChainResponse(ClusterCommand): @@ -11699,12 +11703,12 @@ class NOCResponse(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="statusCode", Tag=0, Type=OperationalCredentials.Enums.OperationalCertStatus), + ClusterObjectFieldDescriptor(Label="statusCode", Tag=0, Type=OperationalCredentials.Enums.NodeOperationalCertStatusEnum), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=1, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="debugText", Tag=2, Type=typing.Optional[str]), ]) - statusCode: 'OperationalCredentials.Enums.OperationalCertStatus' = 0 + statusCode: 'OperationalCredentials.Enums.NodeOperationalCertStatusEnum' = 0 fabricIndex: 'typing.Optional[uint]' = None debugText: 'typing.Optional[str]' = None @@ -11751,10 +11755,10 @@ class AddTrustedRootCertificate(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="rootCertificate", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="rootCACertificate", Tag=0, Type=bytes), ]) - rootCertificate: 'bytes' = b"" + rootCACertificate: 'bytes' = b"" class Attributes: @@ -11786,9 +11790,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.FabricDescriptor]) + return ClusterObjectFieldDescriptor(Type=typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]) - value: 'typing.List[OperationalCredentials.Structs.FabricDescriptor]' = field(default_factory=lambda: []) + value: 'typing.List[OperationalCredentials.Structs.FabricDescriptorStruct]' = field(default_factory=lambda: []) @dataclass class SupportedFabrics(ClusterAttributeDescriptor): diff --git a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py index ae0fbc395e7da4..773f05748f51bc 100644 --- a/src/controller/python/chip/utils/CommissioningBuildingBlocks.py +++ b/src/controller/python/chip/utils/CommissioningBuildingBlocks.py @@ -35,7 +35,7 @@ async def _IsNodeInFabricList(devCtrl, nodeId): resp = await devCtrl.ReadAttribute(nodeId, [(opCreds.Attributes.Fabrics)]) listOfFabricsDescriptor = resp[0][opCreds][Clusters.OperationalCredentials.Attributes.Fabrics] for fabricDescriptor in listOfFabricsDescriptor: - if fabricDescriptor.nodeId == nodeId: + if fabricDescriptor.nodeID == nodeId: return True return False @@ -155,7 +155,7 @@ async def AddNOCForNewFabricFromExisting(commissionerDevCtrl, newFabricDevCtrl, await commissionerDevCtrl.SendCommand(existingNodeId, 0, opCreds.Commands.AddTrustedRootCertificate(chainForAddNOC.rcacBytes)) resp = await commissionerDevCtrl.SendCommand(existingNodeId, 0, opCreds.Commands.AddNOC(chainForAddNOC.nocBytes, chainForAddNOC.icacBytes, chainForAddNOC.ipkBytes, newFabricDevCtrl.nodeId, 0xFFF1)) - if resp.statusCode is not opCreds.Enums.OperationalCertStatus.kSuccess: + if resp.statusCode is not opCreds.Enums.NodeOperationalCertStatusEnum.kOk: # Expiring the failsafe timer in an attempt to clean up. await commissionerDevCtrl.SendCommand(existingNodeId, 0, generalCommissioning.Commands.ArmFailSafe(0)) return False @@ -199,7 +199,7 @@ async def UpdateNOC(devCtrl, existingNodeId, newNodeId): return False resp = await devCtrl.SendCommand(existingNodeId, 0, opCreds.Commands.UpdateNOC(chainForUpdateNOC.nocBytes, chainForUpdateNOC.icacBytes)) - if resp.statusCode is not opCreds.Enums.OperationalCertStatus.kSuccess: + if resp.statusCode is not opCreds.Enums.NodeOperationalCertStatusEnum.kOk: # Expiring the failsafe timer in an attempt to clean up. await devCtrl.SendCommand(existingNodeId, 0, generalCommissioning.Commands.ArmFailSafe(0)) return False diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index acff3d68d31c26..ed46d85c5c2d52 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -4978,6 +4978,11 @@ AdministratorCommissioning: OpenCommissioningWindow: - pakePasscodeVerifier + OperationalCredentials: + AttestationResponse: + - attestationSignature + AddTrustedRootCertificate: + - rootCACertificate structs: OTASoftwareUpdateRequestor: - ProviderLocation @@ -5002,6 +5007,8 @@ - NetworkInterface ModeSelect: - SemanticTagStruct + OperationalCredentials: + - FabricDescriptorStruct struct fields: UnitTesting: SimpleStruct: @@ -5100,6 +5107,19 @@ SemanticTagStruct: - mfgCode - value + OperationalCredentials: + FabricDescriptorStruct: + - rootPublicKey + - vendorID + - fabricID + - nodeID + - label + - fabricIndex + # Values that are actually deprecated, but we effectively + # introduced them in this release. + - vendorId + - fabricId + - nodeId events: OTASoftwareUpdateRequestor: - StateTransition @@ -5194,6 +5214,9 @@ - HardwareFault - RadioFault - BootReasonEnum + OperationalCredentials: + - NodeOperationalCertStatusEnum + - CertificateChainTypeEnum enum values: OTASoftwareUpdateProvider: OTAApplyUpdateAction: @@ -5307,6 +5330,21 @@ - HardwareWatchdogReset - SoftwareUpdateCompleted - SoftwareReset + OperationalCredentials: + NodeOperationalCertStatusEnum: + - OK + - InvalidPublicKey + - InvalidNodeOpId + - InvalidNOC + - MissingCsr + - TableFull + - InvalidAdminSubject + - FabricConflict + - LabelConflict + - InvalidFabricIndex + CertificateChainTypeEnum: + - DACCertificate + - PAICertificate bitmaps: UnitTesting: - Bitmap8MaskMap @@ -5405,6 +5443,11 @@ AdministratorCommissioning: OpenCommissioningWindow: - pakeVerifier + OperationalCredentials: + AttestationResponse: + - signature + AddTrustedRootCertificate: + - rootCertificate structs: Descriptor: - DeviceType @@ -5421,10 +5464,17 @@ - NetworkInterfaceType ModeSelect: - SemanticTag + OperationalCredentials: + - FabricDescriptor struct fields: Descriptor: DeviceTypeStruct: - type + OperationalCredentials: + FabricDescriptorStruct: + - vendorId + - fabricId + - nodeId event fields: Switch: MultiPressComplete: @@ -5441,6 +5491,8 @@ - HardwareFaultType - RadioFaultType - BootReasonType + OperationalCredentials: + - OperationalCertStatus enum values: GeneralCommissioning: CommissioningError: @@ -5503,6 +5555,14 @@ - 100G - 200G - 400G + OperationalCredentials: + # Both the enum and the values got renamed, so don't output the + # new value with the old enum name or the old value with the + # new enum name. + NodeOperationalCertStatusEnum: + - SUCCESS + OperationalCertStatus: + - OK renames: clusters: UnitTesting: TestCluster @@ -5567,6 +5627,11 @@ AdministratorCommissioning: OpenCommissioningWindow: pakePasscodeVerifier: pakeVerifier + OperationalCredentials: + AttestationResponse: + attestationSignature: signature + AddTrustedRootCertificate: + rootCACertificate: rootCertificate structs: AccessControl: AccessControlEntryStruct: AccessControlEntry @@ -5577,10 +5642,17 @@ NetworkInterface: NetworkInterfaceType ModeSelect: SemanticTagStruct: SemanticTag + OperationalCredentials: + FabricDescriptorStruct: FabricDescriptor struct fields: Descriptor: DeviceTypeStruct: deviceType: type + OperationalCredentials: + FabricDescriptorStruct: + vendorID: vendorId + fabricID: fabricId + nodeID: nodeId event fields: Switch: MultiPressComplete: @@ -5597,6 +5669,8 @@ HardwareFault: HardwareFaultType RadioFault: RadioFaultType BootReasonEnum: BootReasonType + OperationalCredentials: + NodeOperationalCertStatusEnum: OperationalCertStatus enum values: GeneralCommissioning: CommissioningError: @@ -5635,6 +5709,11 @@ Rate100G: 100G Rate200G: 200G Rate400G: 400G + OperationalCredentials: + NodeOperationalCertStatusEnum: + OK: SUCCESS + OperationalCertStatus: + OK: SUCCESS bitmap values: NetworkCommissioning: WiFiSecurity: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index ce028d16b81d82..331a8ec4fbb387 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -6897,13 +6897,13 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptor * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptor new]; + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorId)]; - newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index c57ca6bffeb87c..456e9a26a002b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17898,25 +17898,57 @@ typedef NS_ENUM(uint8_t, MTRAdministratorCommissioningStatusCode) { MTRAdministratorCommissioningStatusCodeWindowNotOpen API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_ENUM(uint8_t, MTROperationalCredentialsCertificateChainType) { + MTROperationalCredentialsCertificateChainTypeDACCertificate MTR_NEWLY_AVAILABLE = 0x01, + MTROperationalCredentialsCertificateChainTypePAICertificate MTR_NEWLY_AVAILABLE = 0x02, +} MTR_NEWLY_AVAILABLE; + +typedef NS_ENUM(uint8_t, MTROperationalCredentialsNodeOperationalCertStatus) { + MTROperationalCredentialsNodeOperationalCertStatusOK MTR_NEWLY_AVAILABLE = 0x00, + MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey MTR_NEWLY_AVAILABLE = 0x01, + MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId MTR_NEWLY_AVAILABLE = 0x02, + MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC MTR_NEWLY_AVAILABLE = 0x03, + MTROperationalCredentialsNodeOperationalCertStatusMissingCsr MTR_NEWLY_AVAILABLE = 0x04, + MTROperationalCredentialsNodeOperationalCertStatusTableFull MTR_NEWLY_AVAILABLE = 0x05, + MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject MTR_NEWLY_AVAILABLE = 0x06, + MTROperationalCredentialsNodeOperationalCertStatusFabricConflict MTR_NEWLY_AVAILABLE = 0x09, + MTROperationalCredentialsNodeOperationalCertStatusLabelConflict MTR_NEWLY_AVAILABLE = 0x0A, + MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex MTR_NEWLY_AVAILABLE = 0x0B, +} MTR_NEWLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTROperationalCredentialsOperationalCertStatus) { - MTROperationalCredentialsOperationalCertStatusSUCCESS API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, + MTROperationalCredentialsOperationalCertStatusSUCCESS API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusOK") + = 0x00, MTROperationalCredentialsOperationalCertStatusInvalidPublicKey API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidPublicKey") = 0x01, MTROperationalCredentialsOperationalCertStatusInvalidNodeOpId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNodeOpId") = 0x02, - MTROperationalCredentialsOperationalCertStatusInvalidNOC API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, - MTROperationalCredentialsOperationalCertStatusMissingCsr API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTROperationalCredentialsOperationalCertStatusTableFull API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, - MTROperationalCredentialsOperationalCertStatusInvalidAdminSubject API_AVAILABLE( - ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTROperationalCredentialsOperationalCertStatusInvalidNOC API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidNOC") + = 0x03, + MTROperationalCredentialsOperationalCertStatusMissingCsr API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusMissingCsr") + = 0x04, + MTROperationalCredentialsOperationalCertStatusTableFull API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusTableFull") + = 0x05, + MTROperationalCredentialsOperationalCertStatusInvalidAdminSubject API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), + tvos(16.1)) MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidAdminSubject") = 0x06, MTROperationalCredentialsOperationalCertStatusFabricConflict API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusFabricConflict") = 0x09, MTROperationalCredentialsOperationalCertStatusLabelConflict API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusLabelConflict") = 0x0A, MTROperationalCredentialsOperationalCertStatusInvalidFabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatusInvalidFabricIndex") = 0x0B, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsNodeOperationalCertStatus"); typedef NS_ENUM(uint8_t, MTRGroupKeyManagementGroupKeySecurityPolicy) { MTRGroupKeyManagementGroupKeySecurityPolicyTrustFirst API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 9edf6fdc0f4e9c..c522a5f33241d5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -40308,7 +40308,8 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.certificateType = params.certificateType.unsignedCharValue; + request.certificateType + = static_cast>(params.certificateType.unsignedCharValue); return MTRStartInvokeInteraction( typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); @@ -40488,7 +40489,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.rootCertificate = [self asByteSpan:params.rootCertificate]; + request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; return MTRStartInvokeInteraction( typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index 34f1bc5f58aca0..2f6a522b9d349a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -342,10 +342,14 @@ typedef void (*AdministratorCommissioningClusterStatusCodeAttributeCallback)( void *, chip::app::Clusters::AdministratorCommissioning::StatusCode); typedef void (*NullableAdministratorCommissioningClusterStatusCodeAttributeCallback)( void *, const chip::app::DataModel::Nullable &); -typedef void (*OperationalCredentialsClusterOperationalCertStatusAttributeCallback)( - void *, chip::app::Clusters::OperationalCredentials::OperationalCertStatus); -typedef void (*NullableOperationalCredentialsClusterOperationalCertStatusAttributeCallback)( - void *, const chip::app::DataModel::Nullable &); +typedef void (*OperationalCredentialsClusterCertificateChainTypeEnumAttributeCallback)( + void *, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum); +typedef void (*NullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); +typedef void (*OperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallback)( + void *, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum); +typedef void (*NullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallback)( + void *, const chip::app::DataModel::Nullable &); typedef void (*GroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallback)( void *, chip::app::Clusters::GroupKeyManagement::GroupKeySecurityPolicy); typedef void (*NullableGroupKeyManagementClusterGroupKeySecurityPolicyAttributeCallback)( @@ -804,7 +808,7 @@ typedef void (*OperationalCredentialsNOCsListAttributeCallback)( typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & data); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( @@ -5969,9 +5973,10 @@ class MTROperationalCredentialsFabricsListAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value); + static void + OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value); }; class MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge @@ -15565,74 +15570,151 @@ class MTRNullableAdministratorCommissioningClusterStatusCodeAttributeCallbackSub MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; - static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::OperationalCertStatus value); + static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value); }; -class MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge - : public MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge +class MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge + : public MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge { public: - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action), + MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; + using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge - : public MTRCallbackBridge +class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; + + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); +}; + +class MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge { public: - MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(dispatch_queue_t queue, + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value); + static void OnSuccessFn(void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value); +}; + +class MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge + : public MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge +{ +public: + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, + OnSuccessFn){}; + + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge( + queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::Nullable & value); }; -class MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge - : public MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge +class MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge + : public MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge { public: - MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge( + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge(queue, handler, action), + MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::KeepAliveOnCallback; - using MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnDone; + using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 27e8dabf796129..88a5ec1b9b30e6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -5495,7 +5495,7 @@ void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & value) + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5503,12 +5503,12 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptor * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptor new]; + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; - newElement_0.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorId)]; - newElement_0.fabricId = [NSNumber numberWithUnsignedLongLong:entry_0.fabricId]; - newElement_0.nodeId = [NSNumber numberWithUnsignedLongLong:entry_0.nodeId]; + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() length:entry_0.label.size() encoding:NSUTF8StringEncoding]; @@ -11932,7 +11932,8 @@ length:data.attestationElements.size()]; } { - response.signature = [NSData dataWithBytes:data.signature.data() length:data.signature.size()]; + response.attestationSignature = [NSData dataWithBytes:data.attestationSignature.data() + length:data.attestationSignature.size()]; } DispatchSuccess(context, response); }; @@ -15910,15 +15911,66 @@ } } -void MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::app::Clusters::OperationalCredentials::OperationalCertStatus value) +void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OperationalCredentials::CertificateChainTypeEnum value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; + DispatchSuccess(context, objCValue); +}; + +void MTROperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNullableOperationalCredentialsClusterCertificateChainTypeEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn( + void * context, chip::app::Clusters::OperationalCredentials::NodeOperationalCertStatusEnum value) { NSNumber * _Nonnull objCValue; objCValue = [NSNumber numberWithUnsignedChar:chip::to_underlying(value)]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -15933,8 +15985,8 @@ } } -void MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { NSNumber * _Nullable objCValue; if (value.IsNull()) { @@ -15945,7 +15997,8 @@ DispatchSuccess(context, objCValue); }; -void MTRNullableOperationalCredentialsClusterOperationalCertStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRNullableOperationalCredentialsClusterNodeOperationalCertStatusEnumAttributeCallbackSubscriptionBridge:: + OnSubscriptionEstablished() { if (!mQueue) { return; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index aaab6bc2f3ae14..b86061ab336f4b 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -10206,7 +10206,8 @@ - (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCerti if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.certificateType = params.certificateType.unsignedCharValue; + request.certificateType = static_cast>( + params.certificateType.unsignedCharValue); chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); @@ -10575,7 +10576,7 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.rootCertificate = [self asByteSpan:params.rootCertificate]; + request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; chip::Controller::OperationalCredentialsCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.InvokeCommand(request, bridge, successCb, failureCb, timedInvokeTimeoutMs); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index f2714a5618ee5f..b53ea6f2041389 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -2360,7 +2360,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSData * _Nonnull attestationElements API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSData * _Nonnull signature API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2379,6 +2379,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) + +@property (nonatomic, copy) NSData * _Nonnull signature API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use attestationSignature"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject @@ -2592,7 +2598,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull rootCertificate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull rootCACertificate MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -2610,6 +2616,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) + +@property (nonatomic, copy) NSData * _Nonnull rootCertificate API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use rootCACertificate"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index a002bf55dd823c..d27471742050cb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -3307,7 +3307,7 @@ - (instancetype)init _attestationElements = [NSData data]; - _signature = [NSData data]; + _attestationSignature = [NSData data]; _timedInvokeTimeoutMs = nil; } return self; @@ -3318,7 +3318,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; other.attestationElements = self.attestationElements; - other.signature = self.signature; + other.attestationSignature = self.attestationSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -3326,12 +3326,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: attestationElements:%@; signature:%@; >", NSStringFromClass([self class]), - [_attestationElements base64EncodedStringWithOptions:0], [_signature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString + stringWithFormat:@"<%@: attestationElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), + [_attestationElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; return descriptionString; } +@end + +@implementation MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) + +- (void)setSignature:(NSData * _Nonnull)signature +{ + self.attestationSignature = signature; +} + +- (NSData * _Nonnull)signature +{ + return self.attestationSignature; +} @end @implementation MTROperationalCredentialsClusterCertificateChainRequestParams - (instancetype)init @@ -3631,7 +3644,7 @@ - (instancetype)init { if (self = [super init]) { - _rootCertificate = [NSData data]; + _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; } return self; @@ -3641,7 +3654,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - other.rootCertificate = self.rootCertificate; + other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -3649,11 +3662,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCertificate:%@; >", NSStringFromClass([self class]), - [_rootCertificate base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCACertificate:%@; >", NSStringFromClass([self class]), + [_rootCACertificate base64EncodedStringWithOptions:0]]; return descriptionString; } +@end + +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) + +- (void)setRootCertificate:(NSData * _Nonnull)rootCertificate +{ + self.rootCACertificate = rootCertificate; +} + +- (NSData * _Nonnull)rootCertificate +{ + return self.rootCACertificate; +} @end @implementation MTRGroupKeyManagementClusterKeySetWriteParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 62303563e73931..1ba36af8708fd5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -559,16 +559,23 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) NSNumber * _Nonnull totalNumberOfPressesCounted API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) -@interface MTROperationalCredentialsClusterFabricDescriptor : NSObject -@property (nonatomic, copy) NSData * _Nonnull rootPublicKey API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull vendorId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull fabricId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull nodeId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSString * _Nonnull label API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_NEWLY_AVAILABLE +@interface MTROperationalCredentialsClusterFabricDescriptorStruct : NSObject +@property (nonatomic, copy) NSData * _Nonnull rootPublicKey MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull nodeID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull nodeId MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nonnull label MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_NEWLY_AVAILABLE; @end +API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +MTR_NEWLY_DEPRECATED("Please use MTROperationalCredentialsClusterFabricDescriptorStruct") +@interface MTROperationalCredentialsClusterFabricDescriptor : MTROperationalCredentialsClusterFabricDescriptorStruct +@end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROperationalCredentialsClusterNOCStruct : NSObject @property (nonatomic, copy) NSData * _Nonnull noc API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 7742285fdc5808..4c2b13924e43b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -2184,18 +2184,18 @@ - (NSNumber * _Nonnull)getNewPosition } @end -@implementation MTROperationalCredentialsClusterFabricDescriptor +@implementation MTROperationalCredentialsClusterFabricDescriptorStruct - (instancetype)init { if (self = [super init]) { _rootPublicKey = [NSData data]; - _vendorId = @(0); + _vendorID = @(0); - _fabricId = @(0); + _fabricID = @(0); - _nodeId = @(0); + _nodeID = @(0); _label = @""; @@ -2206,12 +2206,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone { - auto other = [[MTROperationalCredentialsClusterFabricDescriptor alloc] init]; + auto other = [[MTROperationalCredentialsClusterFabricDescriptorStruct alloc] init]; other.rootPublicKey = self.rootPublicKey; - other.vendorId = self.vendorId; - other.fabricId = self.fabricId; - other.nodeId = self.nodeId; + other.vendorID = self.vendorID; + other.fabricID = self.fabricID; + other.nodeID = self.nodeID; other.label = self.label; other.fabricIndex = self.fabricIndex; @@ -2221,12 +2221,45 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: rootPublicKey:%@; vendorId:%@; fabricId:%@; nodeId:%@; label:%@; fabricIndex:%@; >", - NSStringFromClass([self class]), [_rootPublicKey base64EncodedStringWithOptions:0], _vendorId, _fabricId, _nodeId, + [NSString stringWithFormat:@"<%@: rootPublicKey:%@; vendorID:%@; fabricID:%@; nodeID:%@; label:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), [_rootPublicKey base64EncodedStringWithOptions:0], _vendorID, _fabricID, _nodeID, _label, _fabricIndex]; return descriptionString; } +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} + +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} + +- (void)setFabricId:(NSNumber * _Nonnull)fabricId +{ + self.fabricID = fabricId; +} + +- (NSNumber * _Nonnull)fabricId +{ + return self.fabricID; +} + +- (void)setNodeId:(NSNumber * _Nonnull)nodeId +{ + self.nodeID = nodeId; +} + +- (NSNumber * _Nonnull)nodeId +{ + return self.nodeID; +} + +@end + +@implementation MTROperationalCredentialsClusterFabricDescriptor : MTROperationalCredentialsClusterFabricDescriptorStruct @end @implementation MTROperationalCredentialsClusterNOCStruct diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 9179b57d48fa9c..f1c14e78474450 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -8109,7 +8109,8 @@ bool emberAfOperationalCredentialsClusterAttestationRequestCallback( */ bool emberAfOperationalCredentialsClusterAttestationResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - chip::ByteSpan AttestationElements, chip::ByteSpan Signature); + chip::ByteSpan AttestationElements, + chip::ByteSpan AttestationSignature); /** * @brief Operational Credentials Cluster CertificateChainRequest Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 495610c7455834..39d93c9339f60f 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -1051,12 +1051,24 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(AdministratorCommission } } -static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials::OperationalCertStatus val) +static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials::CertificateChainTypeEnum val) { - using EnumType = OperationalCredentials::OperationalCertStatus; + using EnumType = OperationalCredentials::CertificateChainTypeEnum; switch (val) { - case EnumType::kSuccess: + case EnumType::kDACCertificate: + case EnumType::kPAICertificate: + return val; + default: + return static_cast(0); + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalCredentials::NodeOperationalCertStatusEnum val) +{ + using EnumType = OperationalCredentials::NodeOperationalCertStatusEnum; + switch (val) + { + case EnumType::kOk: case EnumType::kInvalidPublicKey: case EnumType::kInvalidNodeOpId: case EnumType::kInvalidNOC: diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 54907ffb5b9cac..3b6da269e54300 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -973,10 +973,18 @@ static StatusCode __attribute__((unused)) kStatusCodekUnknownEnumValue namespace OperationalCredentials { -// Enum for OperationalCertStatus -enum class OperationalCertStatus : uint8_t +// Enum for CertificateChainTypeEnum +enum class CertificateChainTypeEnum : uint8_t { - kSuccess = 0x00, + kDACCertificate = 0x01, + kPAICertificate = 0x02, + kUnknownEnumValue = 0, +}; + +// Enum for NodeOperationalCertStatusEnum +enum class NodeOperationalCertStatusEnum : uint8_t +{ + kOk = 0x00, kInvalidPublicKey = 0x01, kInvalidNodeOpId = 0x02, kInvalidNOC = 0x03, diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 62b56c1c09c656..bab9ed25be187a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -8845,7 +8845,7 @@ namespace Events {} // namespace Events } // namespace AdministratorCommissioning namespace OperationalCredentials { namespace Structs { -namespace FabricDescriptor { +namespace FabricDescriptorStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const { return DoEncode(writer, tag, NullOptional); @@ -8861,9 +8861,9 @@ CHIP_ERROR Type::DoEncode(TLV::TLVWriter & writer, TLV::Tag tag, const Optional< TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRootPublicKey)), rootPublicKey)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorId)), vendorId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricId)), fabricId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeId)), nodeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kVendorID)), vendorID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kFabricID)), fabricID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kNodeID)), nodeID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kLabel)), label)); if (accessingFabricIndex.HasValue()) { @@ -8891,14 +8891,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kRootPublicKey): ReturnErrorOnFailure(DataModel::Decode(reader, rootPublicKey)); break; - case to_underlying(Fields::kVendorId): - ReturnErrorOnFailure(DataModel::Decode(reader, vendorId)); + case to_underlying(Fields::kVendorID): + ReturnErrorOnFailure(DataModel::Decode(reader, vendorID)); break; - case to_underlying(Fields::kFabricId): - ReturnErrorOnFailure(DataModel::Decode(reader, fabricId)); + case to_underlying(Fields::kFabricID): + ReturnErrorOnFailure(DataModel::Decode(reader, fabricID)); break; - case to_underlying(Fields::kNodeId): - ReturnErrorOnFailure(DataModel::Decode(reader, nodeId)); + case to_underlying(Fields::kNodeID): + ReturnErrorOnFailure(DataModel::Decode(reader, nodeID)); break; case to_underlying(Fields::kLabel): ReturnErrorOnFailure(DataModel::Decode(reader, label)); @@ -8917,7 +8917,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) return CHIP_NO_ERROR; } -} // namespace FabricDescriptor +} // namespace FabricDescriptorStruct namespace NOCStruct { CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & writer, TLV::Tag tag) const { @@ -9033,7 +9033,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttestationElements)), attestationElements)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSignature)), signature)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttestationSignature)), attestationSignature)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9055,8 +9056,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kAttestationElements): ReturnErrorOnFailure(DataModel::Decode(reader, attestationElements)); break; - case to_underlying(Fields::kSignature): - ReturnErrorOnFailure(DataModel::Decode(reader, signature)); + case to_underlying(Fields::kAttestationSignature): + ReturnErrorOnFailure(DataModel::Decode(reader, attestationSignature)); break; default: break; @@ -9443,7 +9444,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRootCertificate)), rootCertificate)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kRootCACertificate)), rootCACertificate)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -9462,8 +9463,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kRootCertificate): - ReturnErrorOnFailure(DataModel::Decode(reader, rootCertificate)); + case to_underlying(Fields::kRootCACertificate): + ReturnErrorOnFailure(DataModel::Decode(reader, rootCACertificate)); break; default: break; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 7373f29f659a26..54616044a5437b 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -11245,13 +11245,13 @@ struct TypeInfo } // namespace AdministratorCommissioning namespace OperationalCredentials { namespace Structs { -namespace FabricDescriptor { +namespace FabricDescriptorStruct { enum class Fields { kRootPublicKey = 1, - kVendorId = 2, - kFabricId = 3, - kNodeId = 4, + kVendorID = 2, + kFabricID = 3, + kNodeID = 4, kLabel = 5, kFabricIndex = 254, }; @@ -11260,9 +11260,9 @@ struct Type { public: chip::ByteSpan rootPublicKey; - chip::VendorId vendorId = static_cast(0); - chip::FabricId fabricId = static_cast(0); - chip::NodeId nodeId = static_cast(0); + chip::VendorId vendorID = static_cast(0); + chip::FabricId fabricID = static_cast(0); + chip::NodeId nodeID = static_cast(0); chip::CharSpan label; chip::FabricIndex fabricIndex = static_cast(0); @@ -11283,7 +11283,7 @@ struct Type using DecodableType = Type; -} // namespace FabricDescriptor +} // namespace FabricDescriptorStruct namespace NOCStruct { enum class Fields { @@ -11420,8 +11420,8 @@ struct DecodableType namespace AttestationResponse { enum class Fields { - kAttestationElements = 0, - kSignature = 1, + kAttestationElements = 0, + kAttestationSignature = 1, }; struct Type @@ -11432,7 +11432,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } chip::ByteSpan attestationElements; - chip::ByteSpan signature; + chip::ByteSpan attestationSignature; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -11448,7 +11448,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } chip::ByteSpan attestationElements; - chip::ByteSpan signature; + chip::ByteSpan attestationSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AttestationResponse @@ -11465,7 +11465,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t certificateType = static_cast(0); + CertificateChainTypeEnum certificateType = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -11480,7 +11480,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - uint8_t certificateType = static_cast(0); + CertificateChainTypeEnum certificateType = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CertificateChainRequest @@ -11680,7 +11680,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - OperationalCertStatus statusCode = static_cast(0); + NodeOperationalCertStatusEnum statusCode = static_cast(0); Optional fabricIndex; Optional debugText; @@ -11697,7 +11697,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - OperationalCertStatus statusCode = static_cast(0); + NodeOperationalCertStatusEnum statusCode = static_cast(0); Optional fabricIndex; Optional debugText; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11770,7 +11770,7 @@ struct DecodableType namespace AddTrustedRootCertificate { enum class Fields { - kRootCertificate = 0, + kRootCACertificate = 0, }; struct Type @@ -11780,7 +11780,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - chip::ByteSpan rootCertificate; + chip::ByteSpan rootCACertificate; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -11795,7 +11795,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - chip::ByteSpan rootCertificate; + chip::ByteSpan rootCACertificate; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddTrustedRootCertificate @@ -11820,11 +11820,12 @@ struct TypeInfo namespace Fabrics { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - chip::app::DataModel::DecodableList; + using Type = + chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType>; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> &; + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> &; static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Fabrics::Id; } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 0d56a390b3993f..e5577dfb66dae9 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3402,7 +3402,7 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) { - AddArgument("RootCertificate", &mRequest.rootCertificate); + AddArgument("RootCACertificate", &mRequest.rootCACertificate); ClusterCommand::AddArguments(); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 28a59a03b7366d..c19ad8821dab8c 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -688,33 +688,36 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::Exten ComplexArgumentParser::Finalize(request.clusterId); ComplexArgumentParser::Finalize(request.attributeValueList); } -CHIP_ERROR ComplexArgumentParser::Setup(const char * label, - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::Type & request, - Json::Value & value) +CHIP_ERROR +ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request, + Json::Value & value) { VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.rootPublicKey", "rootPublicKey", + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptorStruct.rootPublicKey", "rootPublicKey", value.isMember("rootPublicKey"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.vendorId", "vendorId", value.isMember("vendorId"))); + ComplexArgumentParser::EnsureMemberExist("FabricDescriptorStruct.vendorID", "vendorID", value.isMember("vendorID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("FabricDescriptorStruct.fabricID", "fabricID", value.isMember("fabricID"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("FabricDescriptorStruct.nodeID", "nodeID", value.isMember("nodeID"))); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.fabricId", "fabricId", value.isMember("fabricId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.nodeId", "nodeId", value.isMember("nodeId"))); - ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("FabricDescriptor.label", "label", value.isMember("label"))); + ComplexArgumentParser::EnsureMemberExist("FabricDescriptorStruct.label", "label", value.isMember("label"))); char labelWithMember[kMaxLabelLength]; snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "rootPublicKey"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.rootPublicKey, value["rootPublicKey"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "vendorId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.vendorId, value["vendorId"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "vendorID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.vendorID, value["vendorID"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricId, value["fabricId"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "fabricID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.fabricID, value["fabricID"])); - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "nodeId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.nodeId, value["nodeId"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "nodeID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.nodeID, value["nodeID"])); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "label"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.label, value["label"])); @@ -728,12 +731,12 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, return CHIP_NO_ERROR; } -void ComplexArgumentParser::Finalize(chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::Type & request) +void ComplexArgumentParser::Finalize(chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request) { ComplexArgumentParser::Finalize(request.rootPublicKey); - ComplexArgumentParser::Finalize(request.vendorId); - ComplexArgumentParser::Finalize(request.fabricId); - ComplexArgumentParser::Finalize(request.nodeId); + ComplexArgumentParser::Finalize(request.vendorID); + ComplexArgumentParser::Finalize(request.fabricID); + ComplexArgumentParser::Finalize(request.nodeID); ComplexArgumentParser::Finalize(request.label); ComplexArgumentParser::Finalize(request.fabricIndex); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 94cd1b782b1ba7..7339dc6d9a5a30 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -113,10 +113,11 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Scenes::Structs Json::Value & value); static void Finalize(chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request); -static CHIP_ERROR Setup(const char * label, chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::Type & request, +static CHIP_ERROR Setup(const char * label, + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request, Json::Value & value); -static void Finalize(chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::Type & request); +static void Finalize(chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::Type & request, Json::Value & value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 1e4caab5ae7438..f77ad32d213845 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -686,7 +686,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType & value) + const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { @@ -698,26 +698,26 @@ DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("VendorId", indent + 1, value.vendorId); + CHIP_ERROR err = LogValue("VendorID", indent + 1, value.vendorID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'VendorId'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'VendorID'"); return err; } } { - CHIP_ERROR err = LogValue("FabricId", indent + 1, value.fabricId); + CHIP_ERROR err = LogValue("FabricID", indent + 1, value.fabricID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricId'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'FabricID'"); return err; } } { - CHIP_ERROR err = LogValue("NodeId", indent + 1, value.nodeId); + CHIP_ERROR err = LogValue("NodeID", indent + 1, value.nodeID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NodeId'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NodeID'"); return err; } } @@ -3903,7 +3903,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("attestationElements", indent + 1, value.attestationElements)); - ReturnErrorOnFailure(DataModelLogger::LogValue("signature", indent + 1, value.signature)); + ReturnErrorOnFailure(DataModelLogger::LogValue("attestationSignature", indent + 1, value.attestationSignature)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -6460,7 +6460,7 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP } case OperationalCredentials::Attributes::Fabrics::Id: { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("Fabrics", 1, value); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h index 435728fd42589a..82643f35a3a980 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -65,8 +65,9 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Actions::Structs::EndpointListStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType & value); +static CHIP_ERROR +LogValue(const char * label, size_t indent, + const chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 0a5d1f165c5097..3a768be32161d9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -67772,7 +67772,7 @@ class TestFabricRemovalWhileSubscribedSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); @@ -68559,7 +68559,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -68585,7 +68585,7 @@ class TestOperationalCredentialsClusterSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { @@ -70380,13 +70380,13 @@ class TestArmFailSafeSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); @@ -70481,7 +70481,7 @@ class TestArmFailSafeSuite : public TestCommand LogStep(5, "Invoke AddTrustedRootCertificate without fail-safe"); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type value; - value.rootCertificate = chip::ByteSpan(chip::Uint8::from_const_char("00000000garbage: not in length on purpose"), 8); + value.rootCACertificate = chip::ByteSpan(chip::Uint8::from_const_char("00000000garbage: not in length on purpose"), 8); return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Commands::AddTrustedRootCertificate::Id, value, chip::NullOptional @@ -73175,13 +73175,13 @@ class TestMultiAdminSuite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 1)); } @@ -97140,21 +97140,21 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -97186,21 +97186,21 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -97731,23 +97731,23 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -97774,18 +97774,18 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -97813,23 +97813,23 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -98162,23 +98162,23 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -98205,18 +98205,18 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -98240,23 +98240,23 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); @@ -99204,17 +99204,17 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -99226,17 +99226,17 @@ class Test_TC_CADMIN_1_3Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -99626,17 +99626,17 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -99648,17 +99648,17 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); @@ -101688,21 +101688,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); @@ -101738,21 +101738,21 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeId", iter_0.GetValue().nodeId, + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 4c3bf43d6fd7bc..8ab732426f50ee 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -33392,7 +33392,7 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand { __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.certificateType = [NSNumber numberWithUnsignedChar:mRequest.certificateType]; + params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -33692,7 +33692,7 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { OperationalCredentialsAddTrustedRootCertificate() : ClusterCommand("add-trusted-root-certificate") { - AddArgument("RootCertificate", &mRequest.rootCertificate); + AddArgument("RootCACertificate", &mRequest.rootCACertificate); ClusterCommand::AddArguments(); } @@ -33707,7 +33707,8 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rootCertificate = [NSData dataWithBytes:mRequest.rootCertificate.data() length:mRequest.rootCertificate.size()]; + params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() + length:mRequest.rootCACertificate.size()]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 9d779b20eaaa44..6549fa71af1042 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -101434,24 +101434,26 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { __auto_type * params = [[MTRReadParams alloc] init]; params.filterByFabric = true; - [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list before setting label Error: %@", err); + [cluster + readAttributeFabricsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list before setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).label, + @"")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -101503,25 +101505,26 @@ class TestOperationalCredentialsCluster : public TestCommandBridge { __auto_type * params = [[MTRReadParams alloc] init]; params.filterByFabric = true; - [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read fabric list after setting label Error: %@", err); + [cluster + readAttributeFabricsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read fabric list after setting label Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = value; - VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, - @"Batcave")); - VerifyOrReturn(CheckValue("FabricIndex", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).fabricIndex, - ourFabricIndex)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValueAsString("Label", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).label, + @"Batcave")); + VerifyOrReturn(CheckValue("FabricIndex", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).fabricIndex, + ourFabricIndex)); + } - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } @@ -104303,11 +104306,12 @@ class TestArmFailSafe : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("NodeId", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).nodeId, + VerifyOrReturn(CheckValue("NodeID", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("Label", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).label, @"")); + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).label, + @"")); } VerifyOrReturn(CheckConstraintType("fabrics", "list", "list")); @@ -104383,7 +104387,7 @@ class TestArmFailSafe : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - params.rootCertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; + params.rootCACertificate = [[NSData alloc] initWithBytes:"00000000" length:8]; [cluster addTrustedRootCertificateWithParams:params completion:^(NSError * _Nullable err) { NSLog(@"Invoke AddTrustedRootCertificate without fail-safe Error: %@", err); @@ -108895,8 +108899,8 @@ class TestMultiAdmin : public TestCommandBridge { { id actualValue = value; VerifyOrReturn(CheckValue("Fabrics", [actualValue count], static_cast(1))); - VerifyOrReturn(CheckValue("NodeId", - ((MTROperationalCredentialsClusterFabricDescriptor *) actualValue[0]).nodeId, + VerifyOrReturn(CheckValue("NodeID", + ((MTROperationalCredentialsClusterFabricDescriptorStruct *) actualValue[0]).nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); } diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h index 78e6f7b4da13a8..2deb1193e41411 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/CHIPClientCallbacks.h @@ -269,7 +269,7 @@ typedef void (*OperationalCredentialsNOCsListAttributeCallback)( typedef void (*OperationalCredentialsFabricsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptor::DecodableType> & data); + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & data); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)(