fix(bootloader_support): Reorder write disabling ECDSA_CURVE_MODE
This commit is contained in:
@@ -77,6 +77,18 @@ ESP_SYSTEM_INIT_FN(esp_security_init, SECONDARY, BIT(0), 103)
|
||||
#endif
|
||||
|
||||
#if CONFIG_SECURE_BOOT_V2_ENABLED
|
||||
// H2, H21
|
||||
#if SOC_ECDSA_P192_CURVE_DEFAULT_DISABLED
|
||||
// Also write protects the ECDSA_CURVE_MODE efuse bit.
|
||||
if (ecdsa_ll_is_configurable_curve_supported()) {
|
||||
err = esp_efuse_write_field_bit(ESP_EFUSE_WR_DIS_ECDSA_CURVE_MODE);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to write protect the ECDSA_CURVE_MODE efuse bit.");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !CONFIG_SECURE_BOOT_SKIP_WRITE_PROTECTION_SCA
|
||||
// C5
|
||||
#if SOC_ECDSA_SUPPORT_CURVE_P384 && !CONFIG_SECURE_BOOT_ECDSA_KEY_LEN_384_BITS
|
||||
|
||||
Reference in New Issue
Block a user