mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
fix(esp_security): Add more validation checks
This commit is contained in:
committed by
Mahavir Jain
parent
0db717b9ec
commit
398d9ea9cd
@@ -561,6 +561,11 @@ esp_err_t esp_key_mgr_activate_key(esp_key_mgr_key_recovery_info_t *key_recovery
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
if (key_recovery_info->magic != KEY_HUK_SECTOR_MAGIC) {
|
||||
ESP_LOGE(TAG, "Invalid key recovery info magic");
|
||||
return ESP_ERR_INVALID_ARG;
|
||||
}
|
||||
|
||||
esp_key_mgr_key_type_t key_type = key_recovery_info->key_type;
|
||||
|
||||
ESP_LOGD(TAG, "Activating key of type %d", key_type);
|
||||
|
||||
Reference in New Issue
Block a user