From 8e5441b5575f7905c2098f8805d31e6cd2918b9e Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Tue, 14 Jan 2025 11:18:10 -0700
Subject: [PATCH 1/5] Generated using: ./alchemy zap --attribute="in-progress"
--sdkRoot=[] --specRoot=[] 'TLSCertificateManagement.adoc'
With manual edits adding description & apiMaturity
---
.github/workflows/tests.yaml | 1 +
scripts/rules.matterlint | 1 +
.../tls-certificate-management-cluster.xml | 142 ++++++++++++++++++
.../zcl/zcl-with-test-extensions.json | 1 +
src/app/zap-templates/zcl/zcl.json | 1 +
src/app/zap_cluster_list.json | 2 +
6 files changed, 148 insertions(+)
create mode 100644 src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml
index c49559864d5aeb..2ae3724126d936 100644
--- a/.github/workflows/tests.yaml
+++ b/.github/workflows/tests.yaml
@@ -198,6 +198,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \
+ src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
diff --git a/scripts/rules.matterlint b/scripts/rules.matterlint
index 069d8b86766f1c..ad2a2b04a190da 100644
--- a/scripts/rules.matterlint
+++ b/scripts/rules.matterlint
@@ -105,6 +105,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/thread-network-directory-clus
load "../src/app/zap-templates/zcl/data-model/chip/time-format-localization-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml";
+load "../src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
diff --git a/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml
new file mode 100644
index 00000000000000..6a151e81e7328a
--- /dev/null
+++ b/src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TLS Certificate Management
+ 0x0801
+ TLS_CERTIFICATE_MANAGEMENT_CLUSTER
+ This Cluster is used to manage TLS Client Certificates and to provision
+ TLS endpoints with enough information to facilitate subsequent connection.
+ true
+ true
+
+ MaxRootCertificates
+ CurrentRootCertificates
+ MaxClientCertificates
+ CurrentClientCertificates
+
+ This command SHALL provision the provided certificate for the passed in CAID.
+
+
+
+
+
+
+ This command SHALL be generated in response to a ProvisionRootCertificate command.
+
+
+
+
+ This command SHALL return the TLSCertStruct for the passed in CAID.
+
+
+
+
+ This command SHALL be generated in response to a FindRootCertificate command.
+
+
+
+
+ This command SHALL return the CAID for the passed in fingerprint.
+
+
+
+
+ This command SHALL be generated in response to a LookupRootCertificate command.
+
+
+
+
+ This command SHALL be generated to request the server removes the certificate provisioned to the provided Certificate Authority ID.
+
+
+
+
+
+ This command SHALL be generated to request the Node generates a Certificate Signing Request.
+
+
+
+
+
+ This command SHALL be generated in response to a TLSClientCSR command.
+
+
+
+
+
+
+ This command SHALL be generated to request the Node provisions the provided Client Certificate Details.
+
+
+
+
+
+
+ This command SHALL be generated in response to a ProvisionClientCertificate command.
+
+
+
+
+ This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID.
+
+
+
+
+ This command SHALL be generated in response to a FindClientCertificate command.
+
+
+
+
+ This command SHALL return the CCDID for the passed in Fingerprint.
+
+
+
+
+ This command SHALL be generated in response to a LookupClientCertificate command.
+
+
+
+
+ This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID.
+
+
+
+
+
+
diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
index 2c3a67aee3d069..054ffc603420a3 100644
--- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json
+++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json
@@ -127,6 +127,7 @@
"time-format-localization-cluster.xml",
"time-synchronization-cluster.xml",
"timer-cluster.xml",
+ "tls-certificate-management-cluster.xml",
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"valve-configuration-and-control-cluster.xml",
diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json
index 52933915f01e6f..77239f9adb0296 100644
--- a/src/app/zap-templates/zcl/zcl.json
+++ b/src/app/zap-templates/zcl/zcl.json
@@ -121,6 +121,7 @@
"time-format-localization-cluster.xml",
"time-synchronization-cluster.xml",
"timer-cluster.xml",
+ "tls-certificate-management-cluster.xml",
"user-label-cluster.xml",
"unit-localization-cluster.xml",
"valve-configuration-and-control-cluster.xml",
diff --git a/src/app/zap_cluster_list.json b/src/app/zap_cluster_list.json
index ad73f7bb1dac99..971d7abede1c89 100644
--- a/src/app/zap_cluster_list.json
+++ b/src/app/zap_cluster_list.json
@@ -123,6 +123,7 @@
"TIME_FORMAT_LOCALIZATION_CLUSTER": [],
"TIME_SYNCHRONIZATION_CLUSTER": [],
"TIMER_CLUSTER": [],
+ "TLS_CERTIFICATE_MANAGEMENT_CLUSTER": [],
"TRUSTED_ROOT_CERTIFICATES_CLUSTER": [],
"UNIT_LOCALIZATION_CLUSTER": [],
"UNIT_TESTING_CLUSTER": [],
@@ -307,6 +308,7 @@
"TIME_FORMAT_LOCALIZATION_CLUSTER": ["time-format-localization-server"],
"TIME_SYNCHRONIZATION_CLUSTER": ["time-synchronization-server"],
"TIMER_CLUSTER": ["timer-server"],
+ "TLS_CERTIFICATE_MANAGEMENT_CLUSTER": [],
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [
"concentration-measurement-server"
],
From c48a7b9b2f5242ba35a57d1106f5f486efe702b8 Mon Sep 17 00:00:00 2001
From: marcos <15697303+gmarcosb@users.noreply.github.com>
Date: Tue, 14 Jan 2025 11:22:01 -0700
Subject: [PATCH 2/5] Generated using ./scripts/tools/zap_regen_all.py
---
docs/ids_and_codes/zap_clusters.md | 1 +
.../data_model/controller-clusters.matter | 115 ++
.../chip/devicecontroller/ChipClusters.java | 601 +++++++
.../chip/devicecontroller/ChipStructs.java | 137 ++
.../devicecontroller/ClusterIDMapping.java | 269 ++++
.../devicecontroller/ClusterInfoMapping.java | 423 +++++
.../devicecontroller/ClusterReadMapping.java | 115 ++
.../devicecontroller/ClusterWriteMapping.java | 2 +
.../chip/devicecontroller/cluster/files.gni | 2 +
...rtificateManagementClusterTLSCertStruct.kt | 56 +
...ClusterTLSClientCertificateDetailStruct.kt | 83 +
.../TlsCertificateManagementCluster.kt | 1414 ++++++++++++++++
.../java/matter/controller/cluster/files.gni | 3 +
...rtificateManagementClusterTLSCertStruct.kt | 56 +
...ClusterTLSClientCertificateDetailStruct.kt | 83 +
.../CHIPAttributeTLVValueDecoder.cpp | 181 +++
.../CHIPEventTLVValueDecoder.cpp | 10 +
.../python/chip/clusters/CHIPClusters.py | 129 ++
.../python/chip/clusters/Objects.py | 470 ++++++
.../MTRAttributeSpecifiedCheck.mm | 39 +
.../MTRAttributeTLVValueDecoder.mm | 59 +
.../CHIP/zap-generated/MTRBaseClusters.h | 135 ++
.../CHIP/zap-generated/MTRBaseClusters.mm | 545 +++++++
.../CHIP/zap-generated/MTRClusterConstants.h | 30 +
.../CHIP/zap-generated/MTRClusterNames.mm | 144 ++
.../CHIP/zap-generated/MTRClusters.h | 53 +
.../CHIP/zap-generated/MTRClusters.mm | 292 ++++
.../zap-generated/MTRCommandPayloadsObjc.h | 411 +++++
.../zap-generated/MTRCommandPayloadsObjc.mm | 1369 ++++++++++++++++
.../MTRCommandPayloads_Internal.h | 96 ++
.../zap-generated/MTRCommandTimedCheck.mm | 12 +
.../zap-generated/MTREventTLVValueDecoder.mm | 15 +
.../CHIP/zap-generated/MTRStructsObjc.h | 13 +
.../CHIP/zap-generated/MTRStructsObjc.mm | 63 +
.../zap-generated/attributes/Accessors.cpp | 288 ++++
.../zap-generated/attributes/Accessors.h | 42 +
.../app-common/zap-generated/callback.h | 97 ++
.../app-common/zap-generated/cluster-enums.h | 2 +
.../zap-generated/cluster-objects.cpp | 697 ++++++++
.../zap-generated/cluster-objects.h | 774 +++++++++
.../app-common/zap-generated/ids/Attributes.h | 42 +
.../app-common/zap-generated/ids/Clusters.h | 3 +
.../app-common/zap-generated/ids/Commands.h | 70 +
.../zap-generated/cluster/Commands.h | 455 ++++++
.../cluster/ComplexArgumentParser.cpp | 73 +
.../cluster/ComplexArgumentParser.h | 11 +
.../cluster/logging/DataModelLogger.cpp | 213 +++
.../cluster/logging/DataModelLogger.h | 28 +
.../cluster/logging/EntryToText.cpp | 73 +
.../zap-generated/cluster/Commands.h | 1430 +++++++++++++++++
50 files changed, 11724 insertions(+)
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
create mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
create mode 100644 src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
diff --git a/docs/ids_and_codes/zap_clusters.md b/docs/ids_and_codes/zap_clusters.md
index 7be5b8a45ef672..e5cd002d72c223 100644
--- a/docs/ids_and_codes/zap_clusters.md
+++ b/docs/ids_and_codes/zap_clusters.md
@@ -138,6 +138,7 @@ Generally regenerate using one of:
| 1366 | 0x556 | Chime |
| 1872 | 0x750 | EcosystemInformation |
| 1873 | 0x751 | CommissionerControl |
+| 2049 | 0x801 | TlsCertificateManagement |
| 4294048773 | 0xFFF1FC05 | UnitTesting |
| 4294048774 | 0xFFF1FC06 | FaultInjection |
| 4294048800 | 0xFFF1FC20 | SampleMei |
diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter
index fdf8e39c07bcb0..69dd7b62df393a 100644
--- a/src/controller/data_model/controller-clusters.matter
+++ b/src/controller/data_model/controller-clusters.matter
@@ -10441,6 +10441,121 @@ cluster CommissionerControl = 1873 {
command access(invoke: manage) CommissionNode(CommissionNodeRequest): ReverseOpenCommissioningWindow = 1;
}
+/** This Cluster is used to manage TLS Client Certificates and to provision
+ TLS endpoints with enough information to facilitate subsequent connection. */
+provisional cluster TlsCertificateManagement = 2049 {
+ revision 1;
+
+ struct TLSCertStruct {
+ int16u caid = 0;
+ long_octet_string<3000> certificate = 1;
+ }
+
+ struct TLSClientCertificateDetailStruct {
+ int16u ccdid = 0;
+ long_octet_string<3000> clientCertificate = 1;
+ octet_string intermediateCertificates[] = 2;
+ }
+
+ readonly attribute int8u maxRootCertificates = 0;
+ readonly attribute int8u currentRootCertificates = 1;
+ readonly attribute int8u maxClientCertificates = 2;
+ readonly attribute int8u currentClientCertificates = 3;
+ readonly attribute command_id generatedCommandList[] = 65528;
+ readonly attribute command_id acceptedCommandList[] = 65529;
+ readonly attribute event_id eventList[] = 65530;
+ readonly attribute attrib_id attributeList[] = 65531;
+ readonly attribute bitmap32 featureMap = 65532;
+ readonly attribute int16u clusterRevision = 65533;
+
+ request struct ProvisionRootCertificateRequest {
+ long_octet_string<3000> certificate = 0;
+ nullable int16u caid = 1;
+ }
+
+ response struct ProvisionRootCertificateResponse = 1 {
+ int16u caid = 0;
+ }
+
+ request struct FindRootCertificateRequest {
+ nullable int16u caid = 0;
+ }
+
+ response struct FindRootCertificateResponse = 3 {
+ TLSCertStruct certificateDetails[] = 0;
+ }
+
+ request struct LookupRootCertificateRequest {
+ octet_string<64> fingerprint = 0;
+ }
+
+ response struct LookupRootCertificateResponse = 5 {
+ int16u caid = 0;
+ }
+
+ request struct RemoveRootCertificateRequest {
+ int16u caid = 0;
+ }
+
+ request struct TLSClientCSRRequest {
+ octet_string nonce = 0;
+ }
+
+ response struct TLSClientCSRResponse = 8 {
+ int16u ccdid = 0;
+ octet_string csr = 1;
+ octet_string nonce = 2;
+ }
+
+ request struct ProvisionClientCertificateRequest {
+ int16u ccdid = 0;
+ TLSClientCertificateDetailStruct clientCertificateDetails = 1;
+ }
+
+ response struct ProvisionClientCertificateResponse = 10 {
+ int16u ccdid = 0;
+ }
+
+ request struct FindClientCertificateRequest {
+ int16u ccdid = 0;
+ }
+
+ response struct FindClientCertificateResponse = 12 {
+ TLSClientCertificateDetailStruct certificateDetails[] = 0;
+ }
+
+ request struct LookupClientCertificateRequest {
+ octet_string<64> fingerprint = 0;
+ }
+
+ response struct LookupClientCertificateResponse = 14 {
+ int16u ccdid = 0;
+ }
+
+ request struct RemoveClientCertificateRequest {
+ int16u ccdid = 0;
+ }
+
+ /** This command SHALL provision the provided certificate for the passed in CAID. */
+ command access(invoke: administer) ProvisionRootCertificate(ProvisionRootCertificateRequest): ProvisionRootCertificateResponse = 0;
+ /** This command SHALL return the TLSCertStruct for the passed in CAID. */
+ command FindRootCertificate(FindRootCertificateRequest): FindRootCertificateResponse = 2;
+ /** This command SHALL return the CAID for the passed in fingerprint. */
+ command LookupRootCertificate(LookupRootCertificateRequest): LookupRootCertificateResponse = 4;
+ /** This command SHALL be generated to request the server removes the certificate provisioned to the provided Certificate Authority ID. */
+ command access(invoke: administer) RemoveRootCertificate(RemoveRootCertificateRequest): DefaultSuccess = 6;
+ /** This command SHALL be generated to request the Node generates a Certificate Signing Request. */
+ command access(invoke: administer) TLSClientCSR(TLSClientCSRRequest): TLSClientCSRResponse = 7;
+ /** This command SHALL be generated to request the Node provisions the provided Client Certificate Details. */
+ command access(invoke: administer) ProvisionClientCertificate(ProvisionClientCertificateRequest): ProvisionClientCertificateResponse = 9;
+ /** This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID. */
+ command FindClientCertificate(FindClientCertificateRequest): FindClientCertificateResponse = 11;
+ /** This command SHALL return the CCDID for the passed in Fingerprint. */
+ command LookupClientCertificate(LookupClientCertificateRequest): LookupClientCertificateResponse = 13;
+ /** This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID. */
+ command access(invoke: administer) RemoveClientCertificate(RemoveClientCertificateRequest): DefaultSuccess = 15;
+}
+
/** The Test Cluster is meant to validate the generated code */
internal cluster UnitTesting = 4294048773 {
revision 1; // NOTE: Default/not specifically set
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
index f32182b925f5ca..da6e6e5c7d63da 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java
@@ -64327,6 +64327,607 @@ public void onSuccess(byte[] tlv) {
}
}
+ public static class TlsCertificateManagementCluster extends BaseChipCluster {
+ public static final long CLUSTER_ID = 2049L;
+
+ private static final long MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID = 0L;
+ private static final long CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID = 1L;
+ private static final long MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID = 2L;
+ private static final long CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID = 3L;
+ private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L;
+ private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L;
+ private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L;
+ private static final long ATTRIBUTE_LIST_ATTRIBUTE_ID = 65531L;
+ private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L;
+ private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L;
+
+ public TlsCertificateManagementCluster(long devicePtr, int endpointId) {
+ super(devicePtr, endpointId, CLUSTER_ID);
+ }
+
+ @Override
+ @Deprecated
+ public long initWithDevice(long devicePtr, int endpointId) {
+ return 0L;
+ }
+
+ public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid) {
+ provisionRootCertificate(callback, certificate, caid, 0);
+ }
+
+ public void provisionRootCertificate(ProvisionRootCertificateResponseCallback callback, byte[] certificate, @Nullable Integer caid, int timedInvokeTimeoutMs) {
+ final long commandId = 0L;
+
+ ArrayList elements = new ArrayList<>();
+ final long certificateFieldID = 0L;
+ BaseTLVType certificatetlvValue = new ByteArrayType(certificate);
+ elements.add(new StructElement(certificateFieldID, certificatetlvValue));
+
+ final long caidFieldID = 1L;
+ BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType();
+ elements.add(new StructElement(caidFieldID, caidtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long caidFieldID = 0L;
+ Integer caid = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == caidFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ caid = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(caid);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid) {
+ findRootCertificate(callback, caid, 0);
+ }
+
+ public void findRootCertificate(FindRootCertificateResponseCallback callback, @Nullable Integer caid, int timedInvokeTimeoutMs) {
+ final long commandId = 2L;
+
+ ArrayList elements = new ArrayList<>();
+ final long caidFieldID = 0L;
+ BaseTLVType caidtlvValue = caid != null ? new UIntType(caid) : new NullType();
+ elements.add(new StructElement(caidFieldID, caidtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long certificateDetailsFieldID = 0L;
+ ArrayList certificateDetails = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == certificateDetailsFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ certificateDetails = castingValue.map((elementcastingValue) -> ChipStructs.TlsCertificateManagementClusterTLSCertStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ callback.onSuccess(certificateDetails);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void lookupRootCertificate(LookupRootCertificateResponseCallback callback, byte[] fingerprint) {
+ lookupRootCertificate(callback, fingerprint, 0);
+ }
+
+ public void lookupRootCertificate(LookupRootCertificateResponseCallback callback, byte[] fingerprint, int timedInvokeTimeoutMs) {
+ final long commandId = 4L;
+
+ ArrayList elements = new ArrayList<>();
+ final long fingerprintFieldID = 0L;
+ BaseTLVType fingerprinttlvValue = new ByteArrayType(fingerprint);
+ elements.add(new StructElement(fingerprintFieldID, fingerprinttlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long caidFieldID = 0L;
+ Integer caid = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == caidFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ caid = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(caid);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void removeRootCertificate(DefaultClusterCallback callback, Integer caid) {
+ removeRootCertificate(callback, caid, 0);
+ }
+
+ public void removeRootCertificate(DefaultClusterCallback callback, Integer caid, int timedInvokeTimeoutMs) {
+ final long commandId = 6L;
+
+ ArrayList elements = new ArrayList<>();
+ final long caidFieldID = 0L;
+ BaseTLVType caidtlvValue = new UIntType(caid);
+ elements.add(new StructElement(caidFieldID, caidtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void TLSClientCSR(TLSClientCSRResponseCallback callback, byte[] nonce) {
+ TLSClientCSR(callback, nonce, 0);
+ }
+
+ public void TLSClientCSR(TLSClientCSRResponseCallback callback, byte[] nonce, int timedInvokeTimeoutMs) {
+ final long commandId = 7L;
+
+ ArrayList elements = new ArrayList<>();
+ final long nonceFieldID = 0L;
+ BaseTLVType noncetlvValue = new ByteArrayType(nonce);
+ elements.add(new StructElement(nonceFieldID, noncetlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long ccdidFieldID = 0L;
+ Integer ccdid = null;
+ final long csrFieldID = 1L;
+ byte[] csr = null;
+ final long nonceFieldID = 2L;
+ byte[] nonce = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == ccdidFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ ccdid = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == csrFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ csr = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == nonceFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ nonce = castingValue.value(byte[].class);
+ }
+ }
+ }
+ callback.onSuccess(ccdid, csr, nonce);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void provisionClientCertificate(ProvisionClientCertificateResponseCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails) {
+ provisionClientCertificate(callback, ccdid, clientCertificateDetails, 0);
+ }
+
+ public void provisionClientCertificate(ProvisionClientCertificateResponseCallback callback, Integer ccdid, ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct clientCertificateDetails, int timedInvokeTimeoutMs) {
+ final long commandId = 9L;
+
+ ArrayList elements = new ArrayList<>();
+ final long ccdidFieldID = 0L;
+ BaseTLVType ccdidtlvValue = new UIntType(ccdid);
+ elements.add(new StructElement(ccdidFieldID, ccdidtlvValue));
+
+ final long clientCertificateDetailsFieldID = 1L;
+ BaseTLVType clientCertificateDetailstlvValue = clientCertificateDetails.encodeTlv();
+ elements.add(new StructElement(clientCertificateDetailsFieldID, clientCertificateDetailstlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long ccdidFieldID = 0L;
+ Integer ccdid = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == ccdidFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ ccdid = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(ccdid);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void findClientCertificate(FindClientCertificateResponseCallback callback, Integer ccdid) {
+ findClientCertificate(callback, ccdid, 0);
+ }
+
+ public void findClientCertificate(FindClientCertificateResponseCallback callback, Integer ccdid, int timedInvokeTimeoutMs) {
+ final long commandId = 11L;
+
+ ArrayList elements = new ArrayList<>();
+ final long ccdidFieldID = 0L;
+ BaseTLVType ccdidtlvValue = new UIntType(ccdid);
+ elements.add(new StructElement(ccdidFieldID, ccdidtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long certificateDetailsFieldID = 0L;
+ ArrayList certificateDetails = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == certificateDetailsFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ certificateDetails = castingValue.map((elementcastingValue) -> ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct.decodeTlv(elementcastingValue));
+ }
+ }
+ }
+ callback.onSuccess(certificateDetails);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void lookupClientCertificate(LookupClientCertificateResponseCallback callback, byte[] fingerprint) {
+ lookupClientCertificate(callback, fingerprint, 0);
+ }
+
+ public void lookupClientCertificate(LookupClientCertificateResponseCallback callback, byte[] fingerprint, int timedInvokeTimeoutMs) {
+ final long commandId = 13L;
+
+ ArrayList elements = new ArrayList<>();
+ final long fingerprintFieldID = 0L;
+ BaseTLVType fingerprinttlvValue = new ByteArrayType(fingerprint);
+ elements.add(new StructElement(fingerprintFieldID, fingerprinttlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ final long ccdidFieldID = 0L;
+ Integer ccdid = null;
+ for (StructElement element: invokeStructValue.value()) {
+ if (element.contextTagNum() == ccdidFieldID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ ccdid = castingValue.value(Integer.class);
+ }
+ }
+ }
+ callback.onSuccess(ccdid);
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public void removeClientCertificate(DefaultClusterCallback callback, Integer ccdid) {
+ removeClientCertificate(callback, ccdid, 0);
+ }
+
+ public void removeClientCertificate(DefaultClusterCallback callback, Integer ccdid, int timedInvokeTimeoutMs) {
+ final long commandId = 15L;
+
+ ArrayList elements = new ArrayList<>();
+ final long ccdidFieldID = 0L;
+ BaseTLVType ccdidtlvValue = new UIntType(ccdid);
+ elements.add(new StructElement(ccdidFieldID, ccdidtlvValue));
+
+ StructType commandArgs = new StructType(elements);
+ invoke(new InvokeCallbackImpl(callback) {
+ @Override
+ public void onResponse(StructType invokeStructValue) {
+ callback.onSuccess();
+ }}, commandId, commandArgs, timedInvokeTimeoutMs);
+ }
+
+ public interface ProvisionRootCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer caid);
+ }
+
+ public interface FindRootCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(ArrayList certificateDetails);
+ }
+
+ public interface LookupRootCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer caid);
+ }
+
+ public interface TLSClientCSRResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer ccdid, byte[] csr, byte[] nonce);
+ }
+
+ public interface ProvisionClientCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer ccdid);
+ }
+
+ public interface FindClientCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(ArrayList certificateDetails);
+ }
+
+ public interface LookupClientCertificateResponseCallback extends BaseClusterCallback {
+ void onSuccess(Integer ccdid);
+ }
+
+ public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AcceptedCommandListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface EventListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public interface AttributeListAttributeCallback extends BaseAttributeCallback {
+ void onSuccess(List value);
+ }
+
+ public void readMaxRootCertificatesAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMaxRootCertificatesAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MAX_ROOT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentRootCertificatesAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentRootCertificatesAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_ROOT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readMaxClientCertificatesAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeMaxClientCertificatesAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, MAX_CLIENT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readCurrentClientCertificatesAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeCurrentClientCertificatesAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CURRENT_CLIENT_CERTIFICATES_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeGeneratedCommandListAttribute(
+ GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, GENERATED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAcceptedCommandListAttribute(
+ AcceptedCommandListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readEventListAttribute(
+ EventListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeEventListAttribute(
+ EventListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, EVENT_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, EVENT_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readAttributeListAttribute(
+ AttributeListAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeAttributeListAttribute(
+ AttributeListAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ATTRIBUTE_LIST_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, ATTRIBUTE_LIST_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readFeatureMapAttribute(
+ LongAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeFeatureMapAttribute(
+ LongAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FEATURE_MAP_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, FEATURE_MAP_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+
+ public void readClusterRevisionAttribute(
+ IntegerAttributeCallback callback) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ readAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, true);
+ }
+
+ public void subscribeClusterRevisionAttribute(
+ IntegerAttributeCallback callback, int minInterval, int maxInterval) {
+ ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, CLUSTER_REVISION_ATTRIBUTE_ID);
+
+ subscribeAttribute(new ReportCallbackImpl(callback, path) {
+ @Override
+ public void onSuccess(byte[] tlv) {
+ Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv);
+ callback.onSuccess(value);
+ }
+ }, CLUSTER_REVISION_ATTRIBUTE_ID, minInterval, maxInterval);
+ }
+ }
+
public static class UnitTestingCluster extends BaseChipCluster {
public static final long CLUSTER_ID = 4294048773L;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
index f730e8a818dd4c..88fa4ac440e12b 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java
@@ -15967,6 +15967,143 @@ public String toString() {
return output.toString();
}
}
+public static class TlsCertificateManagementClusterTLSCertStruct {
+ public Integer caid;
+ public byte[] certificate;
+ private static final long CAID_ID = 0L;
+ private static final long CERTIFICATE_ID = 1L;
+
+ public TlsCertificateManagementClusterTLSCertStruct(
+ Integer caid,
+ byte[] certificate
+ ) {
+ this.caid = caid;
+ this.certificate = certificate;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CAID_ID, new UIntType(caid)));
+ values.add(new StructElement(CERTIFICATE_ID, new ByteArrayType(certificate)));
+
+ return new StructType(values);
+ }
+
+ public static TlsCertificateManagementClusterTLSCertStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer caid = null;
+ byte[] certificate = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CAID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ caid = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CERTIFICATE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ certificate = castingValue.value(byte[].class);
+ }
+ }
+ }
+ return new TlsCertificateManagementClusterTLSCertStruct(
+ caid,
+ certificate
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("TlsCertificateManagementClusterTLSCertStruct {\n");
+ output.append("\tcaid: ");
+ output.append(caid);
+ output.append("\n");
+ output.append("\tcertificate: ");
+ output.append(Arrays.toString(certificate));
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
+public static class TlsCertificateManagementClusterTLSClientCertificateDetailStruct {
+ public Integer ccdid;
+ public byte[] clientCertificate;
+ public ArrayList intermediateCertificates;
+ private static final long CCDID_ID = 0L;
+ private static final long CLIENT_CERTIFICATE_ID = 1L;
+ private static final long INTERMEDIATE_CERTIFICATES_ID = 2L;
+
+ public TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ Integer ccdid,
+ byte[] clientCertificate,
+ ArrayList intermediateCertificates
+ ) {
+ this.ccdid = ccdid;
+ this.clientCertificate = clientCertificate;
+ this.intermediateCertificates = intermediateCertificates;
+ }
+
+ public StructType encodeTlv() {
+ ArrayList values = new ArrayList<>();
+ values.add(new StructElement(CCDID_ID, new UIntType(ccdid)));
+ values.add(new StructElement(CLIENT_CERTIFICATE_ID, new ByteArrayType(clientCertificate)));
+ values.add(new StructElement(INTERMEDIATE_CERTIFICATES_ID, ArrayType.generateArrayType(intermediateCertificates, (elementintermediateCertificates) -> new ByteArrayType(elementintermediateCertificates))));
+
+ return new StructType(values);
+ }
+
+ public static TlsCertificateManagementClusterTLSClientCertificateDetailStruct decodeTlv(BaseTLVType tlvValue) {
+ if (tlvValue == null || tlvValue.type() != TLVType.Struct) {
+ return null;
+ }
+ Integer ccdid = null;
+ byte[] clientCertificate = null;
+ ArrayList intermediateCertificates = null;
+ for (StructElement element: ((StructType)tlvValue).value()) {
+ if (element.contextTagNum() == CCDID_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.UInt) {
+ UIntType castingValue = element.value(UIntType.class);
+ ccdid = castingValue.value(Integer.class);
+ }
+ } else if (element.contextTagNum() == CLIENT_CERTIFICATE_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) {
+ ByteArrayType castingValue = element.value(ByteArrayType.class);
+ clientCertificate = castingValue.value(byte[].class);
+ }
+ } else if (element.contextTagNum() == INTERMEDIATE_CERTIFICATES_ID) {
+ if (element.value(BaseTLVType.class).type() == TLVType.Array) {
+ ArrayType castingValue = element.value(ArrayType.class);
+ intermediateCertificates = castingValue.map((elementcastingValue) -> elementcastingValue.value(byte[].class));
+ }
+ }
+ }
+ return new TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ ccdid,
+ clientCertificate,
+ intermediateCertificates
+ );
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder output = new StringBuilder();
+ output.append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n");
+ output.append("\tccdid: ");
+ output.append(ccdid);
+ output.append("\n");
+ output.append("\tclientCertificate: ");
+ output.append(Arrays.toString(clientCertificate));
+ output.append("\n");
+ output.append("\tintermediateCertificates: ");
+ output.append(intermediateCertificates);
+ output.append("\n");
+ output.append("}\n");
+ return output.toString();
+ }
+}
public static class UnitTestingClusterSimpleStruct {
public Integer a;
public Boolean b;
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
index a2a7cc53273644..a0718acb1c73b2 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java
@@ -406,6 +406,9 @@ public static BaseCluster getCluster(long clusterId) {
if (clusterId == CommissionerControl.ID) {
return new CommissionerControl();
}
+ if (clusterId == TlsCertificateManagement.ID) {
+ return new TlsCertificateManagement();
+ }
if (clusterId == UnitTesting.ID) {
return new UnitTesting();
}
@@ -18534,6 +18537,272 @@ public long getCommandID(String name) throws IllegalArgumentException {
return Command.valueOf(name).getID();
}
}
+ public static class TlsCertificateManagement implements BaseCluster {
+ public static final long ID = 2049L;
+ public long getID() {
+ return ID;
+ }
+
+ public enum Attribute {
+ MaxRootCertificates(0L),
+ CurrentRootCertificates(1L),
+ MaxClientCertificates(2L),
+ CurrentClientCertificates(3L),
+ GeneratedCommandList(65528L),
+ AcceptedCommandList(65529L),
+ EventList(65530L),
+ AttributeList(65531L),
+ FeatureMap(65532L),
+ ClusterRevision(65533L),;
+ private final long id;
+ Attribute(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Attribute value(long id) throws NoSuchFieldError {
+ for (Attribute attribute : Attribute.values()) {
+ if (attribute.getID() == id) {
+ return attribute;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Event {;
+ private final long id;
+ Event(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Event value(long id) throws NoSuchFieldError {
+ for (Event event : Event.values()) {
+ if (event.getID() == id) {
+ return event;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }
+
+ public enum Command {
+ ProvisionRootCertificate(0L),
+ FindRootCertificate(2L),
+ LookupRootCertificate(4L),
+ RemoveRootCertificate(6L),
+ TLSClientCSR(7L),
+ ProvisionClientCertificate(9L),
+ FindClientCertificate(11L),
+ LookupClientCertificate(13L),
+ RemoveClientCertificate(15L),;
+ private final long id;
+ Command(long id) {
+ this.id = id;
+ }
+
+ public long getID() {
+ return id;
+ }
+
+ public static Command value(long id) throws NoSuchFieldError {
+ for (Command command : Command.values()) {
+ if (command.getID() == id) {
+ return command;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ProvisionRootCertificateCommandField {Certificate(0),Caid(1),;
+ private final int id;
+ ProvisionRootCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ProvisionRootCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (ProvisionRootCertificateCommandField field : ProvisionRootCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum FindRootCertificateCommandField {Caid(0),;
+ private final int id;
+ FindRootCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static FindRootCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (FindRootCertificateCommandField field : FindRootCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum LookupRootCertificateCommandField {Fingerprint(0),;
+ private final int id;
+ LookupRootCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static LookupRootCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (LookupRootCertificateCommandField field : LookupRootCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum RemoveRootCertificateCommandField {Caid(0),;
+ private final int id;
+ RemoveRootCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static RemoveRootCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (RemoveRootCertificateCommandField field : RemoveRootCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum TLSClientCSRCommandField {Nonce(0),;
+ private final int id;
+ TLSClientCSRCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static TLSClientCSRCommandField value(int id) throws NoSuchFieldError {
+ for (TLSClientCSRCommandField field : TLSClientCSRCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum ProvisionClientCertificateCommandField {Ccdid(0),ClientCertificateDetails(1),;
+ private final int id;
+ ProvisionClientCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static ProvisionClientCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (ProvisionClientCertificateCommandField field : ProvisionClientCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum FindClientCertificateCommandField {Ccdid(0),;
+ private final int id;
+ FindClientCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static FindClientCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (FindClientCertificateCommandField field : FindClientCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum LookupClientCertificateCommandField {Fingerprint(0),;
+ private final int id;
+ LookupClientCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static LookupClientCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (LookupClientCertificateCommandField field : LookupClientCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }public enum RemoveClientCertificateCommandField {Ccdid(0),;
+ private final int id;
+ RemoveClientCertificateCommandField(int id) {
+ this.id = id;
+ }
+
+ public int getID() {
+ return id;
+ }
+ public static RemoveClientCertificateCommandField value(int id) throws NoSuchFieldError {
+ for (RemoveClientCertificateCommandField field : RemoveClientCertificateCommandField.values()) {
+ if (field.getID() == id) {
+ return field;
+ }
+ }
+ throw new NoSuchFieldError();
+ }
+ }@Override
+ public String getAttributeName(long id) throws NoSuchFieldError {
+ return Attribute.value(id).toString();
+ }
+
+ @Override
+ public String getEventName(long id) throws NoSuchFieldError {
+ return Event.value(id).toString();
+ }
+
+ @Override
+ public String getCommandName(long id) throws NoSuchFieldError {
+ return Command.value(id).toString();
+ }
+
+ @Override
+ public long getAttributeID(String name) throws IllegalArgumentException {
+ return Attribute.valueOf(name).getID();
+ }
+
+ @Override
+ public long getEventID(String name) throws IllegalArgumentException {
+ return Event.valueOf(name).getID();
+ }
+
+ @Override
+ public long getCommandID(String name) throws IllegalArgumentException {
+ return Command.valueOf(name).getID();
+ }
+ }
public static class UnitTesting implements BaseCluster {
public static final long ID = 4294048773L;
public long getID() {
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
index 675c06556a2674..695ff9a3212e70 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java
@@ -21399,6 +21399,250 @@ public void onError(Exception ex) {
}
+ public static class DelegatedTlsCertificateManagementClusterProvisionRootCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.ProvisionRootCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer caid) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo caidResponseValue = new CommandResponseInfo("caid", "Integer");
+ responseValues.put(caidResponseValue, caid);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterFindRootCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.FindRootCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ArrayList certificateDetails) {
+ Map responseValues = new LinkedHashMap<>();
+
+ // certificateDetails: TLSCertStruct
+ // Conversion from this type to Java is not properly implemented yet
+
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterLookupRootCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.LookupRootCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer caid) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo caidResponseValue = new CommandResponseInfo("caid", "Integer");
+ responseValues.put(caidResponseValue, caid);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterTLSClientCSRResponseCallback implements ChipClusters.TlsCertificateManagementCluster.TLSClientCSRResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer ccdid, byte[] csr, byte[] nonce) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer");
+ responseValues.put(ccdidResponseValue, ccdid);
+ CommandResponseInfo csrResponseValue = new CommandResponseInfo("csr", "byte[]");
+ responseValues.put(csrResponseValue, csr);
+ CommandResponseInfo nonceResponseValue = new CommandResponseInfo("nonce", "byte[]");
+ responseValues.put(nonceResponseValue, nonce);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterProvisionClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.ProvisionClientCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer ccdid) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer");
+ responseValues.put(ccdidResponseValue, ccdid);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterFindClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.FindClientCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(ArrayList certificateDetails) {
+ Map responseValues = new LinkedHashMap<>();
+
+ // certificateDetails: TLSClientCertificateDetailStruct
+ // Conversion from this type to Java is not properly implemented yet
+
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterLookupClientCertificateResponseCallback implements ChipClusters.TlsCertificateManagementCluster.LookupClientCertificateResponseCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(Integer ccdid) {
+ Map responseValues = new LinkedHashMap<>();
+
+ CommandResponseInfo ccdidResponseValue = new CommandResponseInfo("ccdid", "Integer");
+ responseValues.put(ccdidResponseValue, ccdid);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception error) {
+ callback.onFailure(error);
+ }
+ }
+ public static class DelegatedTlsCertificateManagementClusterGeneratedCommandListAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterAcceptedCommandListAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterEventListAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.EventListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+ public static class DelegatedTlsCertificateManagementClusterAttributeListAttributeCallback implements ChipClusters.TlsCertificateManagementCluster.AttributeListAttributeCallback, DelegatedClusterCallback {
+ private ClusterCommandCallback callback;
+ @Override
+ public void setCallbackDelegate(ClusterCommandCallback callback) {
+ this.callback = callback;
+ }
+
+ @Override
+ public void onSuccess(List valueList) {
+ Map responseValues = new LinkedHashMap<>();
+ CommandResponseInfo commandResponseInfo = new CommandResponseInfo("valueList", "List");
+ responseValues.put(commandResponseInfo, valueList);
+ callback.onSuccess(responseValues);
+ }
+
+ @Override
+ public void onError(Exception ex) {
+ callback.onFailure(ex);
+ }
+ }
+
+
public static class DelegatedUnitTestingClusterTestSpecificResponseCallback implements ChipClusters.UnitTestingCluster.TestSpecificResponseCallback, DelegatedClusterCallback {
private ClusterCommandCallback callback;
@Override
@@ -23530,6 +23774,10 @@ public Map initializeClusterMap() {
(ptr, endpointId) -> new ChipClusters.CommissionerControlCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("commissionerControl", commissionerControlClusterInfo);
+ ClusterInfo tlsCertificateManagementClusterInfo = new ClusterInfo(
+ (ptr, endpointId) -> new ChipClusters.TlsCertificateManagementCluster(ptr, endpointId), new HashMap<>());
+ clusterMap.put("tlsCertificateManagement", tlsCertificateManagementClusterInfo);
+
ClusterInfo unitTestingClusterInfo = new ClusterInfo(
(ptr, endpointId) -> new ChipClusters.UnitTestingCluster(ptr, endpointId), new HashMap<>());
clusterMap.put("unitTesting", unitTestingClusterInfo);
@@ -23672,6 +23920,7 @@ public void combineCommand(Map destination, Map> getCommandMap() {
commandMap.put("commissionerControl", commissionerControlClusterInteractionInfoMap);
+ Map tlsCertificateManagementClusterInteractionInfoMap = new LinkedHashMap<>();
+
+ Map tlsCertificateManagementprovisionRootCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo = new CommandParameterInfo("certificate", byte[].class, byte[].class);
+ tlsCertificateManagementprovisionRootCertificateCommandParams.put("certificate",tlsCertificateManagementprovisionRootCertificatecertificateCommandParameterInfo);
+
+ CommandParameterInfo tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class);
+ tlsCertificateManagementprovisionRootCertificateCommandParams.put("caid",tlsCertificateManagementprovisionRootCertificatecaidCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementprovisionRootCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .provisionRootCertificate((ChipClusters.TlsCertificateManagementCluster.ProvisionRootCertificateResponseCallback) callback
+ , (byte[])
+ commandArguments.get("certificate")
+
+ , (Integer)
+ commandArguments.get("caid")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterProvisionRootCertificateResponseCallback(),
+ tlsCertificateManagementprovisionRootCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("provisionRootCertificate", tlsCertificateManagementprovisionRootCertificateInteractionInfo);
+
+ Map tlsCertificateManagementfindRootCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class);
+ tlsCertificateManagementfindRootCertificateCommandParams.put("caid",tlsCertificateManagementfindRootCertificatecaidCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementfindRootCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .findRootCertificate((ChipClusters.TlsCertificateManagementCluster.FindRootCertificateResponseCallback) callback
+ , (Integer)
+ commandArguments.get("caid")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterFindRootCertificateResponseCallback(),
+ tlsCertificateManagementfindRootCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("findRootCertificate", tlsCertificateManagementfindRootCertificateInteractionInfo);
+
+ Map tlsCertificateManagementlookupRootCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementlookupRootCertificatefingerprintCommandParameterInfo = new CommandParameterInfo("fingerprint", byte[].class, byte[].class);
+ tlsCertificateManagementlookupRootCertificateCommandParams.put("fingerprint",tlsCertificateManagementlookupRootCertificatefingerprintCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementlookupRootCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .lookupRootCertificate((ChipClusters.TlsCertificateManagementCluster.LookupRootCertificateResponseCallback) callback
+ , (byte[])
+ commandArguments.get("fingerprint")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterLookupRootCertificateResponseCallback(),
+ tlsCertificateManagementlookupRootCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("lookupRootCertificate", tlsCertificateManagementlookupRootCertificateInteractionInfo);
+
+ Map tlsCertificateManagementremoveRootCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementremoveRootCertificatecaidCommandParameterInfo = new CommandParameterInfo("caid", Integer.class, Integer.class);
+ tlsCertificateManagementremoveRootCertificateCommandParams.put("caid",tlsCertificateManagementremoveRootCertificatecaidCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementremoveRootCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .removeRootCertificate((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("caid")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ tlsCertificateManagementremoveRootCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("removeRootCertificate", tlsCertificateManagementremoveRootCertificateInteractionInfo);
+
+ Map tlsCertificateManagementTLSClientCSRCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementTLSClientCSRnonceCommandParameterInfo = new CommandParameterInfo("nonce", byte[].class, byte[].class);
+ tlsCertificateManagementTLSClientCSRCommandParams.put("nonce",tlsCertificateManagementTLSClientCSRnonceCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementTLSClientCSRInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .TLSClientCSR((ChipClusters.TlsCertificateManagementCluster.TLSClientCSRResponseCallback) callback
+ , (byte[])
+ commandArguments.get("nonce")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterTLSClientCSRResponseCallback(),
+ tlsCertificateManagementTLSClientCSRCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("TLSClientCSR", tlsCertificateManagementTLSClientCSRInteractionInfo);
+
+ Map tlsCertificateManagementprovisionClientCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementprovisionClientCertificateccdidCommandParameterInfo = new CommandParameterInfo("ccdid", Integer.class, Integer.class);
+ tlsCertificateManagementprovisionClientCertificateCommandParams.put("ccdid",tlsCertificateManagementprovisionClientCertificateccdidCommandParameterInfo);
+
+ InteractionInfo tlsCertificateManagementprovisionClientCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .provisionClientCertificate((ChipClusters.TlsCertificateManagementCluster.ProvisionClientCertificateResponseCallback) callback
+ , (Integer)
+ commandArguments.get("ccdid")
+
+ , (ChipStructs.TlsCertificateManagementClusterTLSClientCertificateDetailStruct)
+ commandArguments.get("clientCertificateDetails")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterProvisionClientCertificateResponseCallback(),
+ tlsCertificateManagementprovisionClientCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("provisionClientCertificate", tlsCertificateManagementprovisionClientCertificateInteractionInfo);
+
+ Map tlsCertificateManagementfindClientCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementfindClientCertificateccdidCommandParameterInfo = new CommandParameterInfo("ccdid", Integer.class, Integer.class);
+ tlsCertificateManagementfindClientCertificateCommandParams.put("ccdid",tlsCertificateManagementfindClientCertificateccdidCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementfindClientCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .findClientCertificate((ChipClusters.TlsCertificateManagementCluster.FindClientCertificateResponseCallback) callback
+ , (Integer)
+ commandArguments.get("ccdid")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterFindClientCertificateResponseCallback(),
+ tlsCertificateManagementfindClientCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("findClientCertificate", tlsCertificateManagementfindClientCertificateInteractionInfo);
+
+ Map tlsCertificateManagementlookupClientCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementlookupClientCertificatefingerprintCommandParameterInfo = new CommandParameterInfo("fingerprint", byte[].class, byte[].class);
+ tlsCertificateManagementlookupClientCertificateCommandParams.put("fingerprint",tlsCertificateManagementlookupClientCertificatefingerprintCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementlookupClientCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .lookupClientCertificate((ChipClusters.TlsCertificateManagementCluster.LookupClientCertificateResponseCallback) callback
+ , (byte[])
+ commandArguments.get("fingerprint")
+
+ );
+ },
+ () -> new DelegatedTlsCertificateManagementClusterLookupClientCertificateResponseCallback(),
+ tlsCertificateManagementlookupClientCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("lookupClientCertificate", tlsCertificateManagementlookupClientCertificateInteractionInfo);
+
+ Map tlsCertificateManagementremoveClientCertificateCommandParams = new LinkedHashMap();
+
+ CommandParameterInfo tlsCertificateManagementremoveClientCertificateccdidCommandParameterInfo = new CommandParameterInfo("ccdid", Integer.class, Integer.class);
+ tlsCertificateManagementremoveClientCertificateCommandParams.put("ccdid",tlsCertificateManagementremoveClientCertificateccdidCommandParameterInfo);
+ InteractionInfo tlsCertificateManagementremoveClientCertificateInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster)
+ .removeClientCertificate((DefaultClusterCallback) callback
+ , (Integer)
+ commandArguments.get("ccdid")
+ );
+ },
+ () -> new DelegatedDefaultClusterCallback(),
+ tlsCertificateManagementremoveClientCertificateCommandParams
+ );
+ tlsCertificateManagementClusterInteractionInfoMap.put("removeClientCertificate", tlsCertificateManagementremoveClientCertificateInteractionInfo);
+
+ commandMap.put("tlsCertificateManagement", tlsCertificateManagementClusterInteractionInfoMap);
+
Map unitTestingClusterInteractionInfoMap = new LinkedHashMap<>();
Map unitTestingtestCommandParams = new LinkedHashMap();
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
index 855589c5a78b19..50528ea54b02e0 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java
@@ -19460,6 +19460,120 @@ private static Map readCommissionerControlInteractionIn
return result;
}
+ private static Map readTlsCertificateManagementInteractionInfo() {
+ Map result = new LinkedHashMap<>();Map readTlsCertificateManagementMaxRootCertificatesCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementMaxRootCertificatesAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readMaxRootCertificatesAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readTlsCertificateManagementMaxRootCertificatesCommandParams
+ );
+ result.put("readMaxRootCertificatesAttribute", readTlsCertificateManagementMaxRootCertificatesAttributeInteractionInfo);
+ Map readTlsCertificateManagementCurrentRootCertificatesCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementCurrentRootCertificatesAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readCurrentRootCertificatesAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readTlsCertificateManagementCurrentRootCertificatesCommandParams
+ );
+ result.put("readCurrentRootCertificatesAttribute", readTlsCertificateManagementCurrentRootCertificatesAttributeInteractionInfo);
+ Map readTlsCertificateManagementMaxClientCertificatesCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementMaxClientCertificatesAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readMaxClientCertificatesAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readTlsCertificateManagementMaxClientCertificatesCommandParams
+ );
+ result.put("readMaxClientCertificatesAttribute", readTlsCertificateManagementMaxClientCertificatesAttributeInteractionInfo);
+ Map readTlsCertificateManagementCurrentClientCertificatesCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementCurrentClientCertificatesAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readCurrentClientCertificatesAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readTlsCertificateManagementCurrentClientCertificatesCommandParams
+ );
+ result.put("readCurrentClientCertificatesAttribute", readTlsCertificateManagementCurrentClientCertificatesAttributeInteractionInfo);
+ Map readTlsCertificateManagementGeneratedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementGeneratedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readGeneratedCommandListAttribute(
+ (ChipClusters.TlsCertificateManagementCluster.GeneratedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterGeneratedCommandListAttributeCallback(),
+ readTlsCertificateManagementGeneratedCommandListCommandParams
+ );
+ result.put("readGeneratedCommandListAttribute", readTlsCertificateManagementGeneratedCommandListAttributeInteractionInfo);
+ Map readTlsCertificateManagementAcceptedCommandListCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementAcceptedCommandListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readAcceptedCommandListAttribute(
+ (ChipClusters.TlsCertificateManagementCluster.AcceptedCommandListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterAcceptedCommandListAttributeCallback(),
+ readTlsCertificateManagementAcceptedCommandListCommandParams
+ );
+ result.put("readAcceptedCommandListAttribute", readTlsCertificateManagementAcceptedCommandListAttributeInteractionInfo);
+ Map readTlsCertificateManagementEventListCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementEventListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readEventListAttribute(
+ (ChipClusters.TlsCertificateManagementCluster.EventListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterEventListAttributeCallback(),
+ readTlsCertificateManagementEventListCommandParams
+ );
+ result.put("readEventListAttribute", readTlsCertificateManagementEventListAttributeInteractionInfo);
+ Map readTlsCertificateManagementAttributeListCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementAttributeListAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readAttributeListAttribute(
+ (ChipClusters.TlsCertificateManagementCluster.AttributeListAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedTlsCertificateManagementClusterAttributeListAttributeCallback(),
+ readTlsCertificateManagementAttributeListCommandParams
+ );
+ result.put("readAttributeListAttribute", readTlsCertificateManagementAttributeListAttributeInteractionInfo);
+ Map readTlsCertificateManagementFeatureMapCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementFeatureMapAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readFeatureMapAttribute(
+ (ChipClusters.LongAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(),
+ readTlsCertificateManagementFeatureMapCommandParams
+ );
+ result.put("readFeatureMapAttribute", readTlsCertificateManagementFeatureMapAttributeInteractionInfo);
+ Map readTlsCertificateManagementClusterRevisionCommandParams = new LinkedHashMap();
+ InteractionInfo readTlsCertificateManagementClusterRevisionAttributeInteractionInfo = new InteractionInfo(
+ (cluster, callback, commandArguments) -> {
+ ((ChipClusters.TlsCertificateManagementCluster) cluster).readClusterRevisionAttribute(
+ (ChipClusters.IntegerAttributeCallback) callback
+ );
+ },
+ () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(),
+ readTlsCertificateManagementClusterRevisionCommandParams
+ );
+ result.put("readClusterRevisionAttribute", readTlsCertificateManagementClusterRevisionAttributeInteractionInfo);
+
+ return result;
+ }
private static Map readUnitTestingInteractionInfo() {
Map result = new LinkedHashMap<>();Map readUnitTestingBooleanCommandParams = new LinkedHashMap();
InteractionInfo readUnitTestingBooleanAttributeInteractionInfo = new InteractionInfo(
@@ -20746,6 +20860,7 @@ public Map> getReadAttributeMap() {
put("chime", readChimeInteractionInfo());
put("ecosystemInformation", readEcosystemInformationInteractionInfo());
put("commissionerControl", readCommissionerControlInteractionInfo());
+ put("tlsCertificateManagement", readTlsCertificateManagementInteractionInfo());
put("unitTesting", readUnitTestingInteractionInfo());
put("faultInjection", readFaultInjectionInteractionInfo());
put("sampleMei", readSampleMeiInteractionInfo());}};
diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
index c36850932c50db..0b5bc328568bd9 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
+++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java
@@ -3798,6 +3798,8 @@ public Map> getWriteAttributeMap() {
writeAttributeMap.put("ecosystemInformation", writeEcosystemInformationInteractionInfo);
Map writeCommissionerControlInteractionInfo = new LinkedHashMap<>();
writeAttributeMap.put("commissionerControl", writeCommissionerControlInteractionInfo);
+ Map writeTlsCertificateManagementInteractionInfo = new LinkedHashMap<>();
+ writeAttributeMap.put("tlsCertificateManagement", writeTlsCertificateManagementInteractionInfo);
Map writeUnitTestingInteractionInfo = new LinkedHashMap<>();
Map writeUnitTestingBooleanCommandParams = new LinkedHashMap();
CommandParameterInfo unitTestingbooleanCommandParameterInfo =
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
index e93ab3c5d0ac19..ff7b3d9f5d6976 100644
--- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni
@@ -168,6 +168,8 @@ structs_sources = [
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStruct.kt",
"${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/UnitTestingClusterNestedStructList.kt",
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
new file mode 100644
index 00000000000000..304c1e9eee6bef
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class TlsCertificateManagementClusterTLSCertStruct(val caid: UInt, val certificate: ByteArray) {
+ override fun toString(): String = buildString {
+ append("TlsCertificateManagementClusterTLSCertStruct {\n")
+ append("\tcaid : $caid\n")
+ append("\tcertificate : $certificate\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CAID), caid)
+ put(ContextSpecificTag(TAG_CERTIFICATE), certificate)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CAID = 0
+ private const val TAG_CERTIFICATE = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct {
+ tlvReader.enterStructure(tlvTag)
+ val caid = tlvReader.getUInt(ContextSpecificTag(TAG_CAID))
+ val certificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE))
+
+ tlvReader.exitContainer()
+
+ return TlsCertificateManagementClusterTLSCertStruct(caid, certificate)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
new file mode 100644
index 00000000000000..eb53f1ebc03d66
--- /dev/null
+++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package chip.devicecontroller.cluster.structs
+
+import chip.devicecontroller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ val ccdid: UInt,
+ val clientCertificate: ByteArray,
+ val intermediateCertificates: List,
+) {
+ override fun toString(): String = buildString {
+ append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
+ append("\tccdid : $ccdid\n")
+ append("\tclientCertificate : $clientCertificate\n")
+ append("\tintermediateCertificates : $intermediateCertificates\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CCDID), ccdid)
+ put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate)
+ startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
+ for (item in intermediateCertificates.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CCDID = 0
+ private const val TAG_CLIENT_CERTIFICATE = 1
+ private const val TAG_INTERMEDIATE_CERTIFICATES = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): TlsCertificateManagementClusterTLSClientCertificateDetailStruct {
+ tlvReader.enterStructure(tlvTag)
+ val ccdid = tlvReader.getUInt(ContextSpecificTag(TAG_CCDID))
+ val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))
+ val intermediateCertificates =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getByteArray(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ ccdid,
+ clientCertificate,
+ intermediateCertificates,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt
new file mode 100644
index 00000000000000..e4329039707422
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt
@@ -0,0 +1,1414 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package matter.controller.cluster.clusters
+
+import java.time.Duration
+import java.util.logging.Level
+import java.util.logging.Logger
+import kotlinx.coroutines.flow.Flow
+import kotlinx.coroutines.flow.transform
+import matter.controller.InvokeRequest
+import matter.controller.InvokeResponse
+import matter.controller.MatterController
+import matter.controller.ReadData
+import matter.controller.ReadRequest
+import matter.controller.SubscribeRequest
+import matter.controller.SubscriptionState
+import matter.controller.UByteSubscriptionState
+import matter.controller.UIntSubscriptionState
+import matter.controller.UShortSubscriptionState
+import matter.controller.cluster.structs.*
+import matter.controller.model.AttributePath
+import matter.controller.model.CommandPath
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class TlsCertificateManagementCluster(
+ private val controller: MatterController,
+ private val endpointId: UShort,
+) {
+ class ProvisionRootCertificateResponse(val caid: UShort)
+
+ class FindRootCertificateResponse(
+ val certificateDetails: List
+ )
+
+ class LookupRootCertificateResponse(val caid: UShort)
+
+ class TLSClientCSRResponse(val ccdid: UShort, val csr: ByteArray, val nonce: ByteArray)
+
+ class ProvisionClientCertificateResponse(val ccdid: UShort)
+
+ class FindClientCertificateResponse(
+ val certificateDetails: List
+ )
+
+ class LookupClientCertificateResponse(val ccdid: UShort)
+
+ class GeneratedCommandListAttribute(val value: List)
+
+ sealed class GeneratedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : GeneratedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : GeneratedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : GeneratedCommandListAttributeSubscriptionState()
+ }
+
+ class AcceptedCommandListAttribute(val value: List)
+
+ sealed class AcceptedCommandListAttributeSubscriptionState {
+ data class Success(val value: List) : AcceptedCommandListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AcceptedCommandListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AcceptedCommandListAttributeSubscriptionState()
+ }
+
+ class EventListAttribute(val value: List)
+
+ sealed class EventListAttributeSubscriptionState {
+ data class Success(val value: List) : EventListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : EventListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : EventListAttributeSubscriptionState()
+ }
+
+ class AttributeListAttribute(val value: List)
+
+ sealed class AttributeListAttributeSubscriptionState {
+ data class Success(val value: List) : AttributeListAttributeSubscriptionState()
+
+ data class Error(val exception: Exception) : AttributeListAttributeSubscriptionState()
+
+ object SubscriptionEstablished : AttributeListAttributeSubscriptionState()
+ }
+
+ suspend fun provisionRootCertificate(
+ certificate: ByteArray,
+ caid: UShort?,
+ timedInvokeTimeout: Duration? = null,
+ ): ProvisionRootCertificateResponse {
+ val commandId: UInt = 0u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CERTIFICATE_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CERTIFICATE_REQ), certificate)
+
+ val TAG_CAID_REQ: Int = 1
+ caid?.let { tlvWriter.put(ContextSpecificTag(TAG_CAID_REQ), caid) }
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CAID: Int = 0
+ var caid_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CAID)) {
+ caid_decoded = tlvReader.getUShort(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (caid_decoded == null) {
+ throw IllegalStateException("caid not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return ProvisionRootCertificateResponse(caid_decoded)
+ }
+
+ suspend fun findRootCertificate(
+ caid: UShort?,
+ timedInvokeTimeout: Duration? = null,
+ ): FindRootCertificateResponse {
+ val commandId: UInt = 2u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CAID_REQ: Int = 0
+ caid?.let { tlvWriter.put(ContextSpecificTag(TAG_CAID_REQ), caid) }
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CERTIFICATE_DETAILS: Int = 0
+ var certificateDetails_decoded: List? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CERTIFICATE_DETAILS)) {
+ certificateDetails_decoded =
+ buildList {
+ tlvReader.enterArray(tag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(TlsCertificateManagementClusterTLSCertStruct.fromTlv(AnonymousTag, tlvReader))
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (certificateDetails_decoded == null) {
+ throw IllegalStateException("certificateDetails not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return FindRootCertificateResponse(certificateDetails_decoded)
+ }
+
+ suspend fun lookupRootCertificate(
+ fingerprint: ByteArray,
+ timedInvokeTimeout: Duration? = null,
+ ): LookupRootCertificateResponse {
+ val commandId: UInt = 4u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_FINGERPRINT_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_FINGERPRINT_REQ), fingerprint)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CAID: Int = 0
+ var caid_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CAID)) {
+ caid_decoded = tlvReader.getUShort(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (caid_decoded == null) {
+ throw IllegalStateException("caid not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return LookupRootCertificateResponse(caid_decoded)
+ }
+
+ suspend fun removeRootCertificate(caid: UShort, timedInvokeTimeout: Duration? = null) {
+ val commandId: UInt = 6u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CAID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CAID_REQ), caid)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun TLSClientCSR(
+ nonce: ByteArray,
+ timedInvokeTimeout: Duration? = null,
+ ): TLSClientCSRResponse {
+ val commandId: UInt = 7u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_NONCE_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_NONCE_REQ), nonce)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CCDID: Int = 0
+ var ccdid_decoded: UShort? = null
+
+ val TAG_CSR: Int = 1
+ var csr_decoded: ByteArray? = null
+
+ val TAG_NONCE: Int = 2
+ var nonce_decoded: ByteArray? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CCDID)) {
+ ccdid_decoded = tlvReader.getUShort(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_CSR)) {
+ csr_decoded = tlvReader.getByteArray(tag)
+ }
+
+ if (tag == ContextSpecificTag(TAG_NONCE)) {
+ nonce_decoded = tlvReader.getByteArray(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (ccdid_decoded == null) {
+ throw IllegalStateException("ccdid not found in TLV")
+ }
+
+ if (csr_decoded == null) {
+ throw IllegalStateException("csr not found in TLV")
+ }
+
+ if (nonce_decoded == null) {
+ throw IllegalStateException("nonce not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return TLSClientCSRResponse(ccdid_decoded, csr_decoded, nonce_decoded)
+ }
+
+ suspend fun provisionClientCertificate(
+ ccdid: UShort,
+ clientCertificateDetails: TlsCertificateManagementClusterTLSClientCertificateDetailStruct,
+ timedInvokeTimeout: Duration? = null,
+ ): ProvisionClientCertificateResponse {
+ val commandId: UInt = 9u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CCDID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CCDID_REQ), ccdid)
+
+ val TAG_CLIENT_CERTIFICATE_DETAILS_REQ: Int = 1
+ clientCertificateDetails.toTlv(
+ ContextSpecificTag(TAG_CLIENT_CERTIFICATE_DETAILS_REQ),
+ tlvWriter,
+ )
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CCDID: Int = 0
+ var ccdid_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CCDID)) {
+ ccdid_decoded = tlvReader.getUShort(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (ccdid_decoded == null) {
+ throw IllegalStateException("ccdid not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return ProvisionClientCertificateResponse(ccdid_decoded)
+ }
+
+ suspend fun findClientCertificate(
+ ccdid: UShort,
+ timedInvokeTimeout: Duration? = null,
+ ): FindClientCertificateResponse {
+ val commandId: UInt = 11u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CCDID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CCDID_REQ), ccdid)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CERTIFICATE_DETAILS: Int = 0
+ var certificateDetails_decoded:
+ List? =
+ null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CERTIFICATE_DETAILS)) {
+ certificateDetails_decoded =
+ buildList {
+ tlvReader.enterArray(tag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(
+ TlsCertificateManagementClusterTLSClientCertificateDetailStruct.fromTlv(
+ AnonymousTag,
+ tlvReader,
+ )
+ )
+ }
+ tlvReader.exitContainer()
+ }
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (certificateDetails_decoded == null) {
+ throw IllegalStateException("certificateDetails not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return FindClientCertificateResponse(certificateDetails_decoded)
+ }
+
+ suspend fun lookupClientCertificate(
+ fingerprint: ByteArray,
+ timedInvokeTimeout: Duration? = null,
+ ): LookupClientCertificateResponse {
+ val commandId: UInt = 13u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_FINGERPRINT_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_FINGERPRINT_REQ), fingerprint)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+
+ val tlvReader = TlvReader(response.payload)
+ tlvReader.enterStructure(AnonymousTag)
+ val TAG_CCDID: Int = 0
+ var ccdid_decoded: UShort? = null
+
+ while (!tlvReader.isEndOfContainer()) {
+ val tag = tlvReader.peekElement().tag
+
+ if (tag == ContextSpecificTag(TAG_CCDID)) {
+ ccdid_decoded = tlvReader.getUShort(tag)
+ } else {
+ tlvReader.skipElement()
+ }
+ }
+
+ if (ccdid_decoded == null) {
+ throw IllegalStateException("ccdid not found in TLV")
+ }
+
+ tlvReader.exitContainer()
+
+ return LookupClientCertificateResponse(ccdid_decoded)
+ }
+
+ suspend fun removeClientCertificate(ccdid: UShort, timedInvokeTimeout: Duration? = null) {
+ val commandId: UInt = 15u
+
+ val tlvWriter = TlvWriter()
+ tlvWriter.startStructure(AnonymousTag)
+
+ val TAG_CCDID_REQ: Int = 0
+ tlvWriter.put(ContextSpecificTag(TAG_CCDID_REQ), ccdid)
+ tlvWriter.endStructure()
+
+ val request: InvokeRequest =
+ InvokeRequest(
+ CommandPath(endpointId, clusterId = CLUSTER_ID, commandId),
+ tlvPayload = tlvWriter.getEncoded(),
+ timedRequest = timedInvokeTimeout,
+ )
+
+ val response: InvokeResponse = controller.invoke(request)
+ logger.log(Level.FINE, "Invoke command succeeded: ${response}")
+ }
+
+ suspend fun readMaxRootCertificatesAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 0u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Maxrootcertificates attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeMaxRootCertificatesAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 0u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Maxrootcertificates attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentRootCertificatesAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 1u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentrootcertificates attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeCurrentRootCertificatesAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 1u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currentrootcertificates attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readMaxClientCertificatesAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 2u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Maxclientcertificates attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeMaxClientCertificatesAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 2u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Maxclientcertificates attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readCurrentClientCertificatesAttribute(): UByte {
+ val ATTRIBUTE_ID: UInt = 3u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Currentclientcertificates attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeCurrentClientCertificatesAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 3u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UByteSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Currentclientcertificates attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UByte = tlvReader.getUByte(AnonymousTag)
+
+ emit(UByteSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UByteSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65528u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Generatedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return GeneratedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeGeneratedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65528u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ GeneratedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Generatedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(GeneratedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(GeneratedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAcceptedCommandListAttribute(): AcceptedCommandListAttribute {
+ val ATTRIBUTE_ID: UInt = 65529u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Acceptedcommandlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AcceptedCommandListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAcceptedCommandListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65529u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AcceptedCommandListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Acceptedcommandlist attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AcceptedCommandListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AcceptedCommandListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readEventListAttribute(): EventListAttribute {
+ val ATTRIBUTE_ID: UInt = 65530u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return EventListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeEventListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65530u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ EventListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Eventlist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(EventListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(EventListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readAttributeListAttribute(): AttributeListAttribute {
+ val ATTRIBUTE_ID: UInt = 65531u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ return AttributeListAttribute(decodedValue)
+ }
+
+ suspend fun subscribeAttributeListAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65531u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ AttributeListAttributeSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Attributelist attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: List =
+ buildList {
+ tlvReader.enterArray(AnonymousTag)
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getUInt(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ emit(AttributeListAttributeSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(AttributeListAttributeSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readFeatureMapAttribute(): UInt {
+ val ATTRIBUTE_ID: UInt = 65532u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeFeatureMapAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65532u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UIntSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) { "Featuremap attribute not found in Node State update" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UInt = tlvReader.getUInt(AnonymousTag)
+
+ emit(UIntSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UIntSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ suspend fun readClusterRevisionAttribute(): UShort {
+ val ATTRIBUTE_ID: UInt = 65533u
+
+ val attributePath =
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+
+ val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath))
+
+ val response = controller.read(readRequest)
+
+ if (response.successes.isEmpty()) {
+ logger.log(Level.WARNING, "Read command failed")
+ throw IllegalStateException("Read command failed with failures: ${response.failures}")
+ }
+
+ logger.log(Level.FINE, "Read command succeeded")
+
+ val attributeData =
+ response.successes.filterIsInstance().firstOrNull {
+ it.path.attributeId == ATTRIBUTE_ID
+ }
+
+ requireNotNull(attributeData) { "Clusterrevision attribute not found in response" }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ return decodedValue
+ }
+
+ suspend fun subscribeClusterRevisionAttribute(
+ minInterval: Int,
+ maxInterval: Int,
+ ): Flow {
+ val ATTRIBUTE_ID: UInt = 65533u
+ val attributePaths =
+ listOf(
+ AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID)
+ )
+
+ val subscribeRequest: SubscribeRequest =
+ SubscribeRequest(
+ eventPaths = emptyList(),
+ attributePaths = attributePaths,
+ minInterval = Duration.ofSeconds(minInterval.toLong()),
+ maxInterval = Duration.ofSeconds(maxInterval.toLong()),
+ )
+
+ return controller.subscribe(subscribeRequest).transform { subscriptionState ->
+ when (subscriptionState) {
+ is SubscriptionState.SubscriptionErrorNotification -> {
+ emit(
+ UShortSubscriptionState.Error(
+ Exception(
+ "Subscription terminated with error code: ${subscriptionState.terminationCause}"
+ )
+ )
+ )
+ }
+ is SubscriptionState.NodeStateUpdate -> {
+ val attributeData =
+ subscriptionState.updateState.successes
+ .filterIsInstance()
+ .firstOrNull { it.path.attributeId == ATTRIBUTE_ID }
+
+ requireNotNull(attributeData) {
+ "Clusterrevision attribute not found in Node State update"
+ }
+
+ // Decode the TLV data into the appropriate type
+ val tlvReader = TlvReader(attributeData.data)
+ val decodedValue: UShort = tlvReader.getUShort(AnonymousTag)
+
+ emit(UShortSubscriptionState.Success(decodedValue))
+ }
+ SubscriptionState.SubscriptionEstablished -> {
+ emit(UShortSubscriptionState.SubscriptionEstablished)
+ }
+ }
+ }
+ }
+
+ companion object {
+ private val logger = Logger.getLogger(TlsCertificateManagementCluster::class.java.name)
+ const val CLUSTER_ID: UInt = 2049u
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni
index 93f8e17bdce6dc..61f3b274ebc4dd 100644
--- a/src/controller/java/generated/java/matter/controller/cluster/files.gni
+++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni
@@ -168,6 +168,8 @@ matter_structs_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TimeSynchronizationClusterTimeZoneStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TimeSynchronizationClusterTrustedTimeSourceStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/UnitTestingClusterDoubleNestedStructList.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/UnitTestingClusterNestedStruct.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/UnitTestingClusterNestedStructList.kt",
@@ -400,6 +402,7 @@ matter_clusters_sources = [
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TimeFormatLocalizationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TimerCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TimeSynchronizationCluster.kt",
+ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TlsCertificateManagementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/TotalVolatileOrganicCompoundsConcentrationMeasurementCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitLocalizationCluster.kt",
"${chip_root}/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt",
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
new file mode 100644
index 00000000000000..ff9d9f02cb12c4
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSCertStruct.kt
@@ -0,0 +1,56 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class TlsCertificateManagementClusterTLSCertStruct(val caid: UShort, val certificate: ByteArray) {
+ override fun toString(): String = buildString {
+ append("TlsCertificateManagementClusterTLSCertStruct {\n")
+ append("\tcaid : $caid\n")
+ append("\tcertificate : $certificate\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CAID), caid)
+ put(ContextSpecificTag(TAG_CERTIFICATE), certificate)
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CAID = 0
+ private const val TAG_CERTIFICATE = 1
+
+ fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): TlsCertificateManagementClusterTLSCertStruct {
+ tlvReader.enterStructure(tlvTag)
+ val caid = tlvReader.getUShort(ContextSpecificTag(TAG_CAID))
+ val certificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CERTIFICATE))
+
+ tlvReader.exitContainer()
+
+ return TlsCertificateManagementClusterTLSCertStruct(caid, certificate)
+ }
+ }
+}
diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
new file mode 100644
index 00000000000000..17382492b9260b
--- /dev/null
+++ b/src/controller/java/generated/java/matter/controller/cluster/structs/TlsCertificateManagementClusterTLSClientCertificateDetailStruct.kt
@@ -0,0 +1,83 @@
+/*
+ *
+ * Copyright (c) 2023 Project CHIP Authors
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package matter.controller.cluster.structs
+
+import matter.controller.cluster.*
+import matter.tlv.AnonymousTag
+import matter.tlv.ContextSpecificTag
+import matter.tlv.Tag
+import matter.tlv.TlvReader
+import matter.tlv.TlvWriter
+
+class TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ val ccdid: UShort,
+ val clientCertificate: ByteArray,
+ val intermediateCertificates: List,
+) {
+ override fun toString(): String = buildString {
+ append("TlsCertificateManagementClusterTLSClientCertificateDetailStruct {\n")
+ append("\tccdid : $ccdid\n")
+ append("\tclientCertificate : $clientCertificate\n")
+ append("\tintermediateCertificates : $intermediateCertificates\n")
+ append("}\n")
+ }
+
+ fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) {
+ tlvWriter.apply {
+ startStructure(tlvTag)
+ put(ContextSpecificTag(TAG_CCDID), ccdid)
+ put(ContextSpecificTag(TAG_CLIENT_CERTIFICATE), clientCertificate)
+ startArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
+ for (item in intermediateCertificates.iterator()) {
+ put(AnonymousTag, item)
+ }
+ endArray()
+ endStructure()
+ }
+ }
+
+ companion object {
+ private const val TAG_CCDID = 0
+ private const val TAG_CLIENT_CERTIFICATE = 1
+ private const val TAG_INTERMEDIATE_CERTIFICATES = 2
+
+ fun fromTlv(
+ tlvTag: Tag,
+ tlvReader: TlvReader,
+ ): TlsCertificateManagementClusterTLSClientCertificateDetailStruct {
+ tlvReader.enterStructure(tlvTag)
+ val ccdid = tlvReader.getUShort(ContextSpecificTag(TAG_CCDID))
+ val clientCertificate = tlvReader.getByteArray(ContextSpecificTag(TAG_CLIENT_CERTIFICATE))
+ val intermediateCertificates =
+ buildList {
+ tlvReader.enterArray(ContextSpecificTag(TAG_INTERMEDIATE_CERTIFICATES))
+ while (!tlvReader.isEndOfContainer()) {
+ add(tlvReader.getByteArray(AnonymousTag))
+ }
+ tlvReader.exitContainer()
+ }
+
+ tlvReader.exitContainer()
+
+ return TlsCertificateManagementClusterTLSClientCertificateDetailStruct(
+ ccdid,
+ clientCertificate,
+ intermediateCertificates,
+ )
+ }
+ }
+}
diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
index ec5a77895adac2..a2b2c44cb910e1 100644
--- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp
@@ -43429,6 +43429,187 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR
}
break;
}
+ case app::Clusters::TlsCertificateManagement::Id: {
+ using namespace app::Clusters::TlsCertificateManagement;
+ switch (aPath.mAttributeId)
+ {
+ case Attributes::MaxRootCertificates::Id: {
+ using TypeInfo = Attributes::MaxRootCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::CurrentRootCertificates::Id: {
+ using TypeInfo = Attributes::CurrentRootCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::MaxClientCertificates::Id: {
+ using TypeInfo = Attributes::MaxClientCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::CurrentClientCertificates::Id: {
+ using TypeInfo = Attributes::CurrentClientCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ using TypeInfo = Attributes::GeneratedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ using TypeInfo = Attributes::AcceptedCommandList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::AttributeList::Id: {
+ using TypeInfo = Attributes::AttributeList::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ chip::JniReferences::GetInstance().CreateArrayList(value);
+
+ auto iter_value_0 = cppValue.begin();
+ while (iter_value_0.Next())
+ {
+ auto & entry_0 = iter_value_0.GetValue();
+ jobject newElement_0;
+ std::string newElement_0ClassName = "java/lang/Long";
+ std::string newElement_0CtorSignature = "(J)V";
+ jlong jninewElement_0 = static_cast(entry_0);
+ chip::JniReferences::GetInstance().CreateBoxedObject(
+ newElement_0ClassName.c_str(), newElement_0CtorSignature.c_str(), jninewElement_0, newElement_0);
+ chip::JniReferences::GetInstance().AddToList(value, newElement_0);
+ }
+ return value;
+ }
+ case Attributes::FeatureMap::Id: {
+ using TypeInfo = Attributes::FeatureMap::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Long";
+ std::string valueCtorSignature = "(J)V";
+ jlong jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(),
+ jnivalue, value);
+ return value;
+ }
+ case Attributes::ClusterRevision::Id: {
+ using TypeInfo = Attributes::ClusterRevision::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = app::DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR)
+ {
+ return nullptr;
+ }
+ jobject value;
+ std::string valueClassName = "java/lang/Integer";
+ std::string valueCtorSignature = "(I)V";
+ jint jnivalue = static_cast(cppValue);
+ chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue,
+ value);
+ return value;
+ }
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::UnitTesting::Id: {
using namespace app::Clusters::UnitTesting;
switch (aPath.mAttributeId)
diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
index 6b95156977f501..56694c1ea0303f 100644
--- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
+++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp
@@ -9356,6 +9356,16 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader &
}
break;
}
+ case app::Clusters::TlsCertificateManagement::Id: {
+ using namespace app::Clusters::TlsCertificateManagement;
+ switch (aPath.mEventId)
+ {
+ default:
+ *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB;
+ break;
+ }
+ break;
+ }
case app::Clusters::UnitTesting::Id: {
using namespace app::Clusters::UnitTesting;
switch (aPath.mEventId)
diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py
index b231e971d449ef..b391ff5252df2f 100644
--- a/src/controller/python/chip/clusters/CHIPClusters.py
+++ b/src/controller/python/chip/clusters/CHIPClusters.py
@@ -13373,6 +13373,133 @@ class ChipClusters:
},
},
}
+ _TLS_CERTIFICATE_MANAGEMENT_CLUSTER_INFO = {
+ "clusterName": "TlsCertificateManagement",
+ "clusterId": 0x00000801,
+ "commands": {
+ 0x00000000: {
+ "commandId": 0x00000000,
+ "commandName": "ProvisionRootCertificate",
+ "args": {
+ "certificate": "bytes",
+ "caid": "int",
+ },
+ },
+ 0x00000002: {
+ "commandId": 0x00000002,
+ "commandName": "FindRootCertificate",
+ "args": {
+ "caid": "int",
+ },
+ },
+ 0x00000004: {
+ "commandId": 0x00000004,
+ "commandName": "LookupRootCertificate",
+ "args": {
+ "fingerprint": "bytes",
+ },
+ },
+ 0x00000006: {
+ "commandId": 0x00000006,
+ "commandName": "RemoveRootCertificate",
+ "args": {
+ "caid": "int",
+ },
+ },
+ 0x00000007: {
+ "commandId": 0x00000007,
+ "commandName": "TLSClientCSR",
+ "args": {
+ "nonce": "bytes",
+ },
+ },
+ 0x00000009: {
+ "commandId": 0x00000009,
+ "commandName": "ProvisionClientCertificate",
+ "args": {
+ "ccdid": "int",
+ "clientCertificateDetails": "TLSClientCertificateDetailStruct",
+ },
+ },
+ 0x0000000B: {
+ "commandId": 0x0000000B,
+ "commandName": "FindClientCertificate",
+ "args": {
+ "ccdid": "int",
+ },
+ },
+ 0x0000000D: {
+ "commandId": 0x0000000D,
+ "commandName": "LookupClientCertificate",
+ "args": {
+ "fingerprint": "bytes",
+ },
+ },
+ 0x0000000F: {
+ "commandId": 0x0000000F,
+ "commandName": "RemoveClientCertificate",
+ "args": {
+ "ccdid": "int",
+ },
+ },
+ },
+ "attributes": {
+ 0x00000000: {
+ "attributeName": "MaxRootCertificates",
+ "attributeId": 0x00000000,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000001: {
+ "attributeName": "CurrentRootCertificates",
+ "attributeId": 0x00000001,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000002: {
+ "attributeName": "MaxClientCertificates",
+ "attributeId": 0x00000002,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x00000003: {
+ "attributeName": "CurrentClientCertificates",
+ "attributeId": 0x00000003,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF8: {
+ "attributeName": "GeneratedCommandList",
+ "attributeId": 0x0000FFF8,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFF9: {
+ "attributeName": "AcceptedCommandList",
+ "attributeId": 0x0000FFF9,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFB: {
+ "attributeName": "AttributeList",
+ "attributeId": 0x0000FFFB,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFC: {
+ "attributeName": "FeatureMap",
+ "attributeId": 0x0000FFFC,
+ "type": "int",
+ "reportable": True,
+ },
+ 0x0000FFFD: {
+ "attributeName": "ClusterRevision",
+ "attributeId": 0x0000FFFD,
+ "type": "int",
+ "reportable": True,
+ },
+ },
+ }
_UNIT_TESTING_CLUSTER_INFO = {
"clusterName": "UnitTesting",
"clusterId": 0xFFF1FC05,
@@ -14488,6 +14615,7 @@ class ChipClusters:
0x00000556: _CHIME_CLUSTER_INFO,
0x00000750: _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
0x00000751: _COMMISSIONER_CONTROL_CLUSTER_INFO,
+ 0x00000801: _TLS_CERTIFICATE_MANAGEMENT_CLUSTER_INFO,
0xFFF1FC05: _UNIT_TESTING_CLUSTER_INFO,
0xFFF1FC06: _FAULT_INJECTION_CLUSTER_INFO,
0xFFF1FC20: _SAMPLE_MEI_CLUSTER_INFO,
@@ -14620,6 +14748,7 @@ class ChipClusters:
"Chime": _CHIME_CLUSTER_INFO,
"EcosystemInformation": _ECOSYSTEM_INFORMATION_CLUSTER_INFO,
"CommissionerControl": _COMMISSIONER_CONTROL_CLUSTER_INFO,
+ "TlsCertificateManagement": _TLS_CERTIFICATE_MANAGEMENT_CLUSTER_INFO,
"UnitTesting": _UNIT_TESTING_CLUSTER_INFO,
"FaultInjection": _FAULT_INJECTION_CLUSTER_INFO,
"SampleMei": _SAMPLE_MEI_CLUSTER_INFO,
diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py
index 94c7b68a398318..0a8f62def35a92 100644
--- a/src/controller/python/chip/clusters/Objects.py
+++ b/src/controller/python/chip/clusters/Objects.py
@@ -166,6 +166,7 @@
"Chime",
"EcosystemInformation",
"CommissionerControl",
+ "TlsCertificateManagement",
"UnitTesting",
"FaultInjection",
"SampleMei",
@@ -48475,6 +48476,475 @@ def descriptor(cls) -> ClusterObjectDescriptor:
fabricIndex: uint = 0
+@dataclass
+class TlsCertificateManagement(Cluster):
+ id: typing.ClassVar[int] = 0x00000801
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="maxRootCertificates", Tag=0x00000000, Type=uint),
+ ClusterObjectFieldDescriptor(Label="currentRootCertificates", Tag=0x00000001, Type=uint),
+ ClusterObjectFieldDescriptor(Label="maxClientCertificates", Tag=0x00000002, Type=uint),
+ ClusterObjectFieldDescriptor(Label="currentClientCertificates", Tag=0x00000003, Type=uint),
+ ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]),
+ ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint),
+ ])
+
+ maxRootCertificates: uint = 0
+ currentRootCertificates: uint = 0
+ maxClientCertificates: uint = 0
+ currentClientCertificates: uint = 0
+ generatedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ acceptedCommandList: typing.List[uint] = field(default_factory=lambda: [])
+ attributeList: typing.List[uint] = field(default_factory=lambda: [])
+ featureMap: uint = 0
+ clusterRevision: uint = 0
+
+ class Structs:
+ @dataclass
+ class TLSCertStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="certificate", Tag=1, Type=bytes),
+ ])
+
+ caid: 'uint' = 0
+ certificate: 'bytes' = b""
+
+ @dataclass
+ class TLSClientCertificateDetailStruct(ClusterObject):
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clientCertificate", Tag=1, Type=bytes),
+ ClusterObjectFieldDescriptor(Label="intermediateCertificates", Tag=2, Type=typing.List[bytes]),
+ ])
+
+ ccdid: 'uint' = 0
+ clientCertificate: 'bytes' = b""
+ intermediateCertificates: 'typing.List[bytes]' = field(default_factory=lambda: [])
+
+ class Commands:
+ @dataclass
+ class ProvisionRootCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000000
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'ProvisionRootCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="certificate", Tag=0, Type=bytes),
+ ClusterObjectFieldDescriptor(Label="caid", Tag=1, Type=typing.Union[Nullable, uint]),
+ ])
+
+ certificate: bytes = b""
+ caid: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class ProvisionRootCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000001
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=uint),
+ ])
+
+ caid: uint = 0
+
+ @dataclass
+ class FindRootCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000002
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'FindRootCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=typing.Union[Nullable, uint]),
+ ])
+
+ caid: typing.Union[Nullable, uint] = NullValue
+
+ @dataclass
+ class FindRootCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000003
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="certificateDetails", Tag=0, Type=typing.List[TlsCertificateManagement.Structs.TLSCertStruct]),
+ ])
+
+ certificateDetails: typing.List[TlsCertificateManagement.Structs.TLSCertStruct] = field(default_factory=lambda: [])
+
+ @dataclass
+ class LookupRootCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000004
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'LookupRootCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="fingerprint", Tag=0, Type=bytes),
+ ])
+
+ fingerprint: bytes = b""
+
+ @dataclass
+ class LookupRootCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000005
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=uint),
+ ])
+
+ caid: uint = 0
+
+ @dataclass
+ class RemoveRootCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000006
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="caid", Tag=0, Type=uint),
+ ])
+
+ caid: uint = 0
+
+ @dataclass
+ class TLSClientCSR(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000007
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'TLSClientCSRResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="nonce", Tag=0, Type=bytes),
+ ])
+
+ nonce: bytes = b""
+
+ @dataclass
+ class TLSClientCSRResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000008
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="csr", Tag=1, Type=bytes),
+ ClusterObjectFieldDescriptor(Label="nonce", Tag=2, Type=bytes),
+ ])
+
+ ccdid: uint = 0
+ csr: bytes = b""
+ nonce: bytes = b""
+
+ @dataclass
+ class ProvisionClientCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x00000009
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'ProvisionClientCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ClusterObjectFieldDescriptor(Label="clientCertificateDetails", Tag=1, Type=TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct),
+ ])
+
+ ccdid: uint = 0
+ clientCertificateDetails: TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct = field(default_factory=lambda: TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct())
+
+ @dataclass
+ class ProvisionClientCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000A
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ])
+
+ ccdid: uint = 0
+
+ @dataclass
+ class FindClientCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000B
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'FindClientCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ])
+
+ ccdid: uint = 0
+
+ @dataclass
+ class FindClientCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000C
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="certificateDetails", Tag=0, Type=typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct]),
+ ])
+
+ certificateDetails: typing.List[TlsCertificateManagement.Structs.TLSClientCertificateDetailStruct] = field(default_factory=lambda: [])
+
+ @dataclass
+ class LookupClientCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000D
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[str] = 'LookupClientCertificateResponse'
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="fingerprint", Tag=0, Type=bytes),
+ ])
+
+ fingerprint: bytes = b""
+
+ @dataclass
+ class LookupClientCertificateResponse(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000E
+ is_client: typing.ClassVar[bool] = False
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ])
+
+ ccdid: uint = 0
+
+ @dataclass
+ class RemoveClientCertificate(ClusterCommand):
+ cluster_id: typing.ClassVar[int] = 0x00000801
+ command_id: typing.ClassVar[int] = 0x0000000F
+ is_client: typing.ClassVar[bool] = True
+ response_type: typing.ClassVar[typing.Optional[str]] = None
+
+ @ChipUtility.classproperty
+ def descriptor(cls) -> ClusterObjectDescriptor:
+ return ClusterObjectDescriptor(
+ Fields=[
+ ClusterObjectFieldDescriptor(Label="ccdid", Tag=0, Type=uint),
+ ])
+
+ ccdid: uint = 0
+
+ class Attributes:
+ @dataclass
+ class MaxRootCertificates(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000000
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class CurrentRootCertificates(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000001
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class MaxClientCertificates(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000002
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class CurrentClientCertificates(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x00000003
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class GeneratedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF8
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AcceptedCommandList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFF9
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class AttributeList(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFB
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=typing.List[uint])
+
+ value: typing.List[uint] = field(default_factory=lambda: [])
+
+ @dataclass
+ class FeatureMap(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFC
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+ @dataclass
+ class ClusterRevision(ClusterAttributeDescriptor):
+ @ChipUtility.classproperty
+ def cluster_id(cls) -> int:
+ return 0x00000801
+
+ @ChipUtility.classproperty
+ def attribute_id(cls) -> int:
+ return 0x0000FFFD
+
+ @ChipUtility.classproperty
+ def attribute_type(cls) -> ClusterObjectFieldDescriptor:
+ return ClusterObjectFieldDescriptor(Type=uint)
+
+ value: uint = 0
+
+
@dataclass
class UnitTesting(Cluster):
id: typing.ClassVar[int] = 0xFFF1FC05
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
index faa57f6f9837e5..592539f41ef0c9 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm
@@ -5942,6 +5942,42 @@ static BOOL AttributeIsSpecifiedInCommissionerControlCluster(AttributeId aAttrib
}
}
}
+static BOOL AttributeIsSpecifiedInTLSCertificateManagementCluster(AttributeId aAttributeId)
+{
+ using namespace Clusters::TlsCertificateManagement;
+ switch (aAttributeId) {
+ case Attributes::MaxRootCertificates::Id: {
+ return YES;
+ }
+ case Attributes::CurrentRootCertificates::Id: {
+ return YES;
+ }
+ case Attributes::MaxClientCertificates::Id: {
+ return YES;
+ }
+ case Attributes::CurrentClientCertificates::Id: {
+ return YES;
+ }
+ case Attributes::GeneratedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AcceptedCommandList::Id: {
+ return YES;
+ }
+ case Attributes::AttributeList::Id: {
+ return YES;
+ }
+ case Attributes::FeatureMap::Id: {
+ return YES;
+ }
+ case Attributes::ClusterRevision::Id: {
+ return YES;
+ }
+ default: {
+ return NO;
+ }
+ }
+}
static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId)
{
using namespace Clusters::UnitTesting;
@@ -6633,6 +6669,9 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId)
case Clusters::CommissionerControl::Id: {
return AttributeIsSpecifiedInCommissionerControlCluster(aAttributeId);
}
+ case Clusters::TlsCertificateManagement::Id: {
+ return AttributeIsSpecifiedInTLSCertificateManagementCluster(aAttributeId);
+ }
case Clusters::UnitTesting::Id: {
return AttributeIsSpecifiedInUnitTestingCluster(aAttributeId);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
index 82643640a5807b..6fef7f4889fce7 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm
@@ -18102,6 +18102,62 @@ static id _Nullable DecodeAttributeValueForCommissionerControlCluster(AttributeI
*aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
return nil;
}
+static id _Nullable DecodeAttributeValueForTLSCertificateManagementCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
+{
+ using namespace Clusters::TlsCertificateManagement;
+ switch (aAttributeId) {
+ case Attributes::MaxRootCertificates::Id: {
+ using TypeInfo = Attributes::MaxRootCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:cppValue];
+ return value;
+ }
+ case Attributes::CurrentRootCertificates::Id: {
+ using TypeInfo = Attributes::CurrentRootCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:cppValue];
+ return value;
+ }
+ case Attributes::MaxClientCertificates::Id: {
+ using TypeInfo = Attributes::MaxClientCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:cppValue];
+ return value;
+ }
+ case Attributes::CurrentClientCertificates::Id: {
+ using TypeInfo = Attributes::CurrentClientCertificates::TypeInfo;
+ TypeInfo::DecodableType cppValue;
+ *aError = DataModel::Decode(aReader, cppValue);
+ if (*aError != CHIP_NO_ERROR) {
+ return nil;
+ }
+ NSNumber * _Nonnull value;
+ value = [NSNumber numberWithUnsignedChar:cppValue];
+ return value;
+ }
+ default: {
+ break;
+ }
+ }
+
+ *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB;
+ return nil;
+}
static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError)
{
using namespace Clusters::UnitTesting;
@@ -20068,6 +20124,9 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T
case Clusters::CommissionerControl::Id: {
return DecodeAttributeValueForCommissionerControlCluster(aPath.mAttributeId, aReader, aError);
}
+ case Clusters::TlsCertificateManagement::Id: {
+ return DecodeAttributeValueForTLSCertificateManagementCluster(aPath.mAttributeId, aReader, aError);
+ }
case Clusters::UnitTesting::Id: {
return DecodeAttributeValueForUnitTestingCluster(aPath.mAttributeId, aReader, aError);
}
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
index 32fdd8a670daae..8193460364759d 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h
@@ -15122,6 +15122,141 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster TLS Certificate Management
+ *
+ * This Cluster is used to manage TLS Client Certificates and to provision
+ TLS endpoints with enough information to facilitate subsequent connection.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRBaseClusterTLSCertificateManagement : MTRGenericBaseCluster
+
+/**
+ * Command ProvisionRootCertificate
+ *
+ * This command SHALL provision the provided certificate for the passed in CAID.
+ */
+- (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command FindRootCertificate
+ *
+ * This command SHALL return the TLSCertStruct for the passed in CAID.
+ */
+- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command LookupRootCertificate
+ *
+ * This command SHALL return the CAID for the passed in fingerprint.
+ */
+- (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command RemoveRootCertificate
+ *
+ * This command SHALL be generated to request the server removes the certificate provisioned to the provided Certificate Authority ID.
+ */
+- (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command TLSClientCSR
+ *
+ * This command SHALL be generated to request the Node generates a Certificate Signing Request.
+ */
+- (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command ProvisionClientCertificate
+ *
+ * This command SHALL be generated to request the Node provisions the provided Client Certificate Details.
+ */
+- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command FindClientCertificate
+ *
+ * This command SHALL return the TLSClientCertificateDetailStruct for the passed in CCDID.
+ */
+- (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command LookupClientCertificate
+ *
+ * This command SHALL return the CCDID for the passed in Fingerprint.
+ */
+- (void)lookupClientCertificateWithParams:(MTRTLSCertificateManagementClusterLookupClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Command RemoveClientCertificate
+ *
+ * This command SHALL be generated to request the Node removes the certificate provisioned to the provided Client Certificate Details ID.
+ */
+- (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeMaxRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMaxRootCertificatesWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMaxRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentRootCertificatesWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeMaxClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeMaxClientCertificatesWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeMaxClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeCurrentClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeCurrentClientCertificatesWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeCurrentClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE;
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRBaseClusterTLSCertificateManagement (Availability)
+
+/**
+ * For all instance methods (reads, writes, commands) that take a completion,
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Unit Testing
*
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
index f850014c5e6179..0b65f679247c55 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm
@@ -102591,6 +102591,551 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC
@end
+@implementation MTRBaseClusterTLSCertificateManagement
+
+- (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterProvisionRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::ProvisionRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterFindRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::FindRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterFindRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterLookupRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::LookupRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterRemoveRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::RemoveRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterTLSClientCSRParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::TLSClientCSR::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterTLSClientCSRResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterProvisionClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::ProvisionClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterFindClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::FindClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterFindClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)lookupClientCertificateWithParams:(MTRTLSCertificateManagementClusterLookupClientCertificateParams *)params completion:(void (^)(MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterLookupClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::LookupClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+- (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterRemoveClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::RemoveClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)readAttributeMaxRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxRootCertificates::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMaxRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxRootCertificates::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMaxRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxRootCertificates::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentRootCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentRootCertificates::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeMaxClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxClientCertificates::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeMaxClientCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxClientCertificates::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeMaxClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::MaxClientCertificates::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeCurrentClientCertificatesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeCurrentClientCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeCurrentClientCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::CurrentClientCertificates::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::GeneratedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AcceptedCommandList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AttributeList::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AttributeList::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::AttributeList::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::FeatureMap::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::FeatureMap::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::FeatureMap::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::ClusterRevision::TypeInfo;
+ [self.device _readKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:nil
+ queue:self.callbackQueue
+ completion:completion];
+}
+
+- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params
+ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished
+ reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::ClusterRevision::TypeInfo;
+ [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID
+ clusterID:@(TypeInfo::GetClusterId())
+ attributeID:@(TypeInfo::GetAttributeId())
+ params:params
+ queue:self.callbackQueue
+ reportHandler:reportHandler
+ subscriptionEstablished:subscriptionEstablished];
+}
+
++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion
+{
+ using TypeInfo = TlsCertificateManagement::Attributes::ClusterRevision::TypeInfo;
+ [clusterStateCacheContainer
+ _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue])
+ clusterID:TypeInfo::GetClusterId()
+ attributeID:TypeInfo::GetAttributeId()
+ queue:queue
+ completion:completion];
+}
+
+@end
+
@implementation MTRBaseClusterUnitTesting
- (void)testWithCompletion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
index eb2101c339fa0c..1f1e93e1059df2 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h
@@ -206,6 +206,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) {
MTRClusterIDTypeChimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000556,
MTRClusterIDTypeEcosystemInformationID MTR_PROVISIONALLY_AVAILABLE = 0x00000750,
MTRClusterIDTypeCommissionerControlID MTR_PROVISIONALLY_AVAILABLE = 0x00000751,
+ MTRClusterIDTypeTLSCertificateManagementID MTR_PROVISIONALLY_AVAILABLE = 0x00000801,
MTRClusterIDTypeUnitTestingID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05,
MTRClusterIDTypeSampleMEIID MTR_PROVISIONALLY_AVAILABLE = 0xFFF1FC20,
@@ -4745,6 +4746,17 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
MTRAttributeIDTypeClusterCommissionerControlAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
MTRAttributeIDTypeClusterCommissionerControlAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+ // Cluster TLSCertificateManagement attributes
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxRootCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAttributeListID,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeFeatureMapID,
+ MTRAttributeIDTypeClusterTLSCertificateManagementAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID,
+
// Cluster TestCluster deprecated attribute names
MTRClusterTestClusterAttributeBooleanID
MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
@@ -6980,6 +6992,24 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
MTRCommandIDTypeClusterCommissionerControlCommandCommissionNodeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
MTRCommandIDTypeClusterCommissionerControlCommandReverseOpenCommissioningWindowID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ // Cluster TLSCertificateManagement commands
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionRootCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000000,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionRootCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000001,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandFindRootCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandFindRootCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000003,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupRootCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000004,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupRootCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000005,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveRootCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000006,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRID MTR_PROVISIONALLY_AVAILABLE = 0x00000007,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRResponseID MTR_PROVISIONALLY_AVAILABLE = 0x00000008,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x00000009,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000C,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000D,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateResponseID MTR_PROVISIONALLY_AVAILABLE = 0x0000000E,
+ MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveClientCertificateID MTR_PROVISIONALLY_AVAILABLE = 0x0000000F,
+
// Cluster TestCluster deprecated command id names
MTRClusterTestClusterCommandTestID
MTR_DEPRECATED("Please use MTRCommandIDTypeClusterUnitTestingCommandTestID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4))
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
index caa9471bdbe707..f00e246b93d3a8 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm
@@ -396,6 +396,9 @@
case MTRClusterIDTypeCommissionerControlID:
result = @"CommissionerControl";
break;
+ case MTRClusterIDTypeTLSCertificateManagementID:
+ result = @"TLSCertificateManagement";
+ break;
case MTRClusterIDTypeUnitTestingID:
result = @"UnitTesting";
break;
@@ -8188,6 +8191,53 @@
}
break;
+ case MTRClusterIDTypeTLSCertificateManagementID:
+
+ switch (attributeID) {
+
+ // Cluster TLSCertificateManagement attributes
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxRootCertificatesID:
+ result = @"MaxRootCertificates";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID:
+ result = @"CurrentRootCertificates";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID:
+ result = @"MaxClientCertificates";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID:
+ result = @"CurrentClientCertificates";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeGeneratedCommandListID:
+ result = @"GeneratedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAcceptedCommandListID:
+ result = @"AcceptedCommandList";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAttributeListID:
+ result = @"AttributeList";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeFeatureMapID:
+ result = @"FeatureMap";
+ break;
+
+ case MTRAttributeIDTypeClusterTLSCertificateManagementAttributeClusterRevisionID:
+ result = @"ClusterRevision";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", attributeID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (attributeID) {
@@ -11060,6 +11110,52 @@
}
break;
+ case MTRClusterIDTypeTLSCertificateManagementID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionRootCertificateID:
+ result = @"ProvisionRootCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandFindRootCertificateID:
+ result = @"FindRootCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupRootCertificateID:
+ result = @"LookupRootCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveRootCertificateID:
+ result = @"RemoveRootCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRID:
+ result = @"TLSClientCSR";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateID:
+ result = @"ProvisionClientCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateID:
+ result = @"FindClientCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateID:
+ result = @"LookupClientCertificate";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandRemoveClientCertificateID:
+ result = @"RemoveClientCertificate";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (commandID) {
@@ -12764,6 +12860,44 @@
}
break;
+ case MTRClusterIDTypeTLSCertificateManagementID:
+
+ switch (commandID) {
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionRootCertificateResponseID:
+ result = @"ProvisionRootCertificateResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandFindRootCertificateResponseID:
+ result = @"FindRootCertificateResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupRootCertificateResponseID:
+ result = @"LookupRootCertificateResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandTLSClientCSRResponseID:
+ result = @"TLSClientCSRResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandProvisionClientCertificateResponseID:
+ result = @"ProvisionClientCertificateResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandFindClientCertificateResponseID:
+ result = @"FindClientCertificateResponse";
+ break;
+
+ case MTRCommandIDTypeClusterTLSCertificateManagementCommandLookupClientCertificateResponseID:
+ result = @"LookupClientCertificateResponse";
+ break;
+
+ default:
+ result = [NSString stringWithFormat:@"", commandID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (commandID) {
@@ -14617,6 +14751,16 @@
}
break;
+ case MTRClusterIDTypeTLSCertificateManagementID:
+
+ switch (eventID) {
+
+ default:
+ result = [NSString stringWithFormat:@"", eventID];
+ break;
+ }
+ break;
+
case MTRClusterIDTypeUnitTestingID:
switch (eventID) {
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
index ee7b66ce8a02d3..500436c2afa82a 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h
@@ -7072,6 +7072,59 @@ MTR_PROVISIONALLY_AVAILABLE
@end
+/**
+ * Cluster TLS Certificate Management
+ * This Cluster is used to manage TLS Client Certificates and to provision
+ TLS endpoints with enough information to facilitate subsequent connection.
+ */
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRClusterTLSCertificateManagement : MTRGenericCluster
+
+- (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)lookupClientCertificateWithParams:(MTRTLSCertificateManagementClusterLookupClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE;
+- (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeMaxRootCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeCurrentRootCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeMaxClientCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeCurrentClientCertificatesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE;
+
+- (instancetype)init NS_UNAVAILABLE;
++ (instancetype)new NS_UNAVAILABLE;
+
+@end
+
+@interface MTRClusterTLSCertificateManagement (Availability)
+
+/**
+ * For all instance methods that take a completion (i.e. command invocations),
+ * the completion will be called on the provided queue.
+ */
+- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
+ endpointID:(NSNumber *)endpointID
+ queue:(dispatch_queue_t)queue MTR_PROVISIONALLY_AVAILABLE;
+
+@end
+
/**
* Cluster Unit Testing
* The Test Cluster is meant to validate the generated code
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
index e954ff8cf94228..7382e8a74d0f2e 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm
@@ -20572,6 +20572,298 @@ - (void)commissionNodeWithParams:(MTRCommissionerControlClusterCommissionNodePar
@end
+@implementation MTRClusterTLSCertificateManagement
+
+- (void)provisionRootCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterProvisionRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::ProvisionRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)findRootCertificateWithParams:(MTRTLSCertificateManagementClusterFindRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterFindRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::FindRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterFindRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)lookupRootCertificateWithParams:(MTRTLSCertificateManagementClusterLookupRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterLookupRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::LookupRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)removeRootCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveRootCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterRemoveRootCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::RemoveRootCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)TLSClientCSRWithParams:(MTRTLSCertificateManagementClusterTLSClientCSRParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterTLSClientCSRResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterTLSClientCSRParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::TLSClientCSR::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterTLSClientCSRResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)provisionClientCertificateWithParams:(MTRTLSCertificateManagementClusterProvisionClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterProvisionClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::ProvisionClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterProvisionClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)findClientCertificateWithParams:(MTRTLSCertificateManagementClusterFindClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterFindClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterFindClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::FindClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterFindClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)lookupClientCertificateWithParams:(MTRTLSCertificateManagementClusterLookupClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams * _Nullable data, NSError * _Nullable error))completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterLookupClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(response, error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::LookupClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:MTRTLSCertificateManagementClusterLookupClientCertificateResponseParams.class
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (void)removeClientCertificateWithParams:(MTRTLSCertificateManagementClusterRemoveClientCertificateParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
+{
+ if (params == nil) {
+ params = [[MTRTLSCertificateManagementClusterRemoveClientCertificateParams
+ alloc] init];
+ }
+
+ auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) {
+ completion(error);
+ };
+
+ auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs;
+
+ using RequestType = TlsCertificateManagement::Commands::RemoveClientCertificate::Type;
+ [self.device _invokeKnownCommandWithEndpointID:self.endpointID
+ clusterID:@(RequestType::GetClusterId())
+ commandID:@(RequestType::GetCommandId())
+ commandPayload:params
+ expectedValues:expectedValues
+ expectedValueInterval:expectedValueIntervalMs
+ timedInvokeTimeout:timedInvokeTimeoutMs
+ serverSideProcessingTimeout:params.serverSideProcessingTimeout
+ responseClass:nil
+ queue:self.callbackQueue
+ completion:responseHandler];
+}
+
+- (NSDictionary * _Nullable)readAttributeMaxRootCertificatesWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxRootCertificatesID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeCurrentRootCertificatesWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentRootCertificatesID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeMaxClientCertificatesWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeMaxClientCertificatesID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeCurrentClientCertificatesWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeCurrentClientCertificatesID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeGeneratedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAcceptedCommandListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeAttributeListID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeFeatureMapID) params:params];
+}
+
+- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params
+{
+ return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeTLSCertificateManagementID) attributeID:@(MTRAttributeIDTypeClusterTLSCertificateManagementAttributeClusterRevisionID) params:params];
+}
+
+@end
+
@implementation MTRClusterUnitTesting
- (void)testWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion
diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
index ad67fe683e4d7e..26b4c7e981e130 100644
--- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
+++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h
@@ -12278,6 +12278,417 @@ MTR_PROVISIONALLY_AVAILABLE
error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
@end
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterProvisionRootCertificateParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull certificate MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) NSNumber * _Nullable caid MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams : NSObject
+
+@property (nonatomic, copy) NSNumber * _Nonnull caid MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRTLSCertificateManagementClusterProvisionRootCertificateResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterFindRootCertificateParams : NSObject
+
+@property (nonatomic, copy) NSNumber * _Nullable caid MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterFindRootCertificateResponseParams : NSObject
+
+@property (nonatomic, copy) NSArray * _Nonnull certificateDetails MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRTLSCertificateManagementClusterFindRootCertificateResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterLookupRootCertificateParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull fingerprint MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams : NSObject
+
+@property (nonatomic, copy) NSNumber * _Nonnull caid MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRTLSCertificateManagementClusterLookupRootCertificateResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue
+ error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterRemoveRootCertificateParams : NSObject
+
+@property (nonatomic, copy) NSNumber * _Nonnull caid MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterTLSClientCSRParams : NSObject
+
+@property (nonatomic, copy) NSData * _Nonnull nonce MTR_PROVISIONALLY_AVAILABLE;
+/**
+ * Controls whether the command is a timed command (using Timed Invoke).
+ *
+ * If nil (the default value), a regular invoke is done for commands that do
+ * not require a timed invoke and a timed invoke with some default timed request
+ * timeout is done for commands that require a timed invoke.
+ *
+ * If not nil, a timed invoke is done, with the provided value used as the timed
+ * request timeout. The value should be chosen small enough to provide the
+ * desired security properties but large enough that it will allow a round-trip
+ * from the sever to the client (for the status response and actual invoke
+ * request) within the timeout window.
+ *
+ */
+@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs;
+
+/**
+ * Controls how much time, in seconds, we will allow for the server to process the command.
+ *
+ * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes.
+ *
+ * If nil, the framework will try to select an appropriate timeout value itself.
+ */
+@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout;
+@end
+
+MTR_PROVISIONALLY_AVAILABLE
+@interface MTRTLSCertificateManagementClusterTLSClientCSRResponseParams : NSObject
+
+@property (nonatomic, copy) NSNumber * _Nonnull ccdid MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) NSData * _Nonnull csr MTR_PROVISIONALLY_AVAILABLE;
+
+@property (nonatomic, copy) NSData * _Nonnull nonce MTR_PROVISIONALLY_AVAILABLE;
+
+/**
+ * Initialize an MTRTLSCertificateManagementClusterTLSClientCSRResponseParams with a response-value dictionary
+ * of the sort that MTRDeviceResponseHandler would receive.
+ *
+ * Will return nil and hand out an error if the response-value dictionary is not
+ * a command data response or is not the right command response.
+ *
+ * Will return nil and hand out an error if the data response does not match the known
+ * schema for this command.
+ */
+- (nullable instancetype)initWithResponseValue:(NSDictionary