ota: Enable the handling of encrypted OTA image

Also, added the docs around OTA and sample usage in light example.
This commit is contained in:
Shubham Patil
2023-06-07 15:39:53 +05:30
parent 9be53266b1
commit e04c1eb302
7 changed files with 86 additions and 1 deletions
+9
View File
@@ -79,3 +79,12 @@ void esp_matter_ota_requestor_start(void)
gRequestorUser.Init(&gRequestorCore, &gImageProcessor);
#endif
}
#if CONFIG_ENABLE_ENCRYPTED_OTA
esp_err_t esp_matter_ota_requestor_encrypted_init(const char *key, uint16_t size)
{
VerifyOrReturnError(key != nullptr, ESP_ERR_INVALID_ARG);
VerifyOrReturnError(gImageProcessor.InitEncryptedOTA(chip::CharSpan{key, size}) == CHIP_NO_ERROR, ESP_ERR_INVALID_STATE);
return ESP_OK;
}
#endif // CONFIG_ENABLE_ENCRYPTED_OTA