controller: add function to set custom Device Attestation store

This commit is contained in:
WanqQixiang
2025-09-29 17:43:56 +08:00
parent 017c4d40b2
commit e8f8b3bbfe
3 changed files with 19 additions and 6 deletions
@@ -307,6 +307,13 @@ cleanup:
}
#endif // CONFIG_DCL_ATTESTATION_TRUST_STORE
static AttestationTrustStore *s_custom_store = nullptr;
void set_custom_attestation_trust_store(AttestationTrustStore *custom_store)
{
s_custom_store = custom_store;
}
const AttestationTrustStore *get_attestation_trust_store()
{
#if CONFIG_TEST_ATTESTATION_TRUST_STORE
@@ -316,6 +323,8 @@ const AttestationTrustStore *get_attestation_trust_store()
return &spiffs_attestation_trust_store::get_instance();
#elif CONFIG_DCL_ATTESTATION_TRUST_STORE
return &dcl_attestation_trust_store::get_instance();
#elif CONFIG_CUSTOM_ATTESTATION_TRUST_STORE
return s_custom_store;
#endif
}
@@ -92,6 +92,8 @@ private:
};
#endif // CONFIG_DCL_ATTESTATION_TRUST_STORE
void set_custom_attestation_trust_store(AttestationTrustStore *custom_store);
const AttestationTrustStore *get_attestation_trust_store();
} // namespace Credentials
@@ -631,12 +631,6 @@ esp_err_t controller_register_commands()
"\tcontroller pairing unpair <nodeid>",
.handler = controller_pairing_handler,
},
{
.name = "group-settings",
.description = "Managing the groups and keysets of the controller.\n"
"\tUsage: controller group-settings <sub-commands>",
.handler = controller_group_settings_handler,
},
{
.name = "icd",
.description = "icd client management.\n"
@@ -654,6 +648,14 @@ esp_err_t controller_register_commands()
},
#endif
#endif // CONFIG_ESP_MATTER_COMMISSIONER_ENABLE
#ifndef CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER
{
.name = "group-settings",
.description = "Managing the groups and keysets of the controller.\n"
"\tUsage: controller group-settings <sub-commands>",
.handler = controller_group_settings_handler,
},
#endif // !CONFIG_ESP_MATTER_ENABLE_MATTER_SERVER
{
.name = "open-commissioning-window",
.description =