mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(esp_security): Fixes incorrect key manager configuration for ESP32-P4 rev < 3
This commit is contained in:
@@ -34,10 +34,6 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
|
||||
efuse_hal_set_ecdsa_key(conf->curve, conf->efuse_key_blk);
|
||||
|
||||
#if SOC_KEY_MANAGER_ECDSA_KEY_DEPLOY
|
||||
if (!key_mgr_ll_is_supported()) {
|
||||
HAL_ASSERT(false && "Key manager is not supported");
|
||||
}
|
||||
|
||||
// Force Key Manager to use eFuse key for XTS-AES operation
|
||||
if (conf->curve == ECDSA_CURVE_SECP192R1) {
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_192_KEY, ESP_KEY_MGR_USE_EFUSE_KEY);
|
||||
@@ -48,6 +44,10 @@ static void configure_ecdsa_periph(ecdsa_hal_config_t *conf)
|
||||
}
|
||||
#if SOC_KEY_MANAGER_SUPPORTED
|
||||
else {
|
||||
if (!key_mgr_ll_is_supported()) {
|
||||
HAL_ASSERT(false && "Key manager is not supported");
|
||||
}
|
||||
|
||||
if (conf->curve == ECDSA_CURVE_SECP192R1) {
|
||||
key_mgr_hal_set_key_usage(ESP_KEY_MGR_ECDSA_192_KEY, ESP_KEY_MGR_USE_OWN_KEY);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user