fixup! efuse: Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5)

This commit is contained in:
KonstantinKondrashov 2023-04-24 15:13:04 +08:00 committed by BOT
parent da96a8a104
commit 11e71cd3eb
2 changed files with 0 additions and 10 deletions

View File

@ -287,9 +287,6 @@ esp_err_t esp_efuse_write_key(esp_efuse_block_t block, esp_efuse_purpose_t purpo
#if SOC_FLASH_ENCRYPTION_XTS_AES_256
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_1 ||
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_2 ||
#endif
#if SOC_ECDSA_SUPPORTED
purpose == ESP_EFUSE_KEY_PURPOSE_ECDSA_KEY ||
#endif
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY)) {
ESP_LOGE(TAG, "BLOCK9 can not have the %d purpose because of HW bug (see TRM for more details)", purpose);

View File

@ -60,10 +60,6 @@ TEST_CASE("Test efuse API blocks burning XTS and ECDSA keys into BLOCK9", "[efus
purpose = ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_2;
TEST_ESP_ERR(ESP_ERR_NOT_SUPPORTED, esp_efuse_write_key(EFUSE_BLK9, purpose, &key, sizeof(key)));
#endif
#if SOC_ECDSA_SUPPORTED
purpose = ESP_EFUSE_KEY_PURPOSE_ECDSA_KEY;
TEST_ESP_ERR(ESP_ERR_NOT_SUPPORTED, esp_efuse_write_key(EFUSE_BLK9, purpose, &key, sizeof(key)));
#endif
}
#endif // SOC_EFUSE_BLOCK9_KEY_PURPOSE_QUIRK
@ -156,9 +152,6 @@ TEST_CASE("Test esp_efuse_write_key for virt mode", "[efuse]")
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_1 ||
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_2 ||
#endif //#ifdef SOC_EFUSE_SUPPORT_XTS_AES_256_KEYS
#if SOC_ECDSA_SUPPORTED
purpose == ESP_EFUSE_KEY_PURPOSE_ECDSA_KEY ||
#endif
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY)) {
printf("BLOCK9 can not have the %d purpose, use RESERVED instead\n", purpose);
purpose = ESP_EFUSE_KEY_PURPOSE_RESERVED;