mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
Merge branch 'feature/secure_boot_dev_approach' into 'master'
feat(bootloader_support): Support SB-on app can do OTA on SB-off chip Closes IDFGH-12079 See merge request espressif/esp-idf!29027
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -143,11 +143,11 @@ esp_err_t esp_secure_boot_get_signature_blocks_for_running_app(bool digest_publi
|
|||||||
|
|
||||||
static esp_err_t get_secure_boot_key_digests(esp_image_sig_public_key_digests_t *public_key_digests)
|
static esp_err_t get_secure_boot_key_digests(esp_image_sig_public_key_digests_t *public_key_digests)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
|
if (!esp_secure_boot_enabled()) { // CONFIG_SECURE_SIGNED_ON_UPDATE_NO_SECURE_BOOT
|
||||||
// Gets key digests from running app
|
// Gets key digests from running app
|
||||||
ESP_LOGI(TAG, "Take trusted digest key(s) from running app");
|
ESP_LOGI(TAG, "Take trusted digest key(s) from running app");
|
||||||
return esp_secure_boot_get_signature_blocks_for_running_app(true, public_key_digests);
|
return esp_secure_boot_get_signature_blocks_for_running_app(true, public_key_digests);
|
||||||
#elif CONFIG_SECURE_BOOT_V2_ENABLED
|
} else { // CONFIG_SECURE_BOOT_V2_ENABLED
|
||||||
ESP_LOGI(TAG, "Take trusted digest key(s) from eFuse block(s)");
|
ESP_LOGI(TAG, "Take trusted digest key(s) from eFuse block(s)");
|
||||||
// Read key digests from efuse
|
// Read key digests from efuse
|
||||||
esp_secure_boot_key_digests_t efuse_trusted;
|
esp_secure_boot_key_digests_t efuse_trusted;
|
||||||
@@ -162,8 +162,8 @@ static esp_err_t get_secure_boot_key_digests(esp_image_sig_public_key_digests_t
|
|||||||
if (public_key_digests->num_digests > 0) {
|
if (public_key_digests->num_digests > 0) {
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return ESP_ERR_NOT_FOUND;
|
return ESP_ERR_NOT_FOUND;
|
||||||
#endif // CONFIG_SECURE_BOOT_V2_ENABLED
|
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_err_t esp_secure_boot_verify_signature(uint32_t src_addr, uint32_t length)
|
esp_err_t esp_secure_boot_verify_signature(uint32_t src_addr, uint32_t length)
|
||||||
|
Reference in New Issue
Block a user