Skip to content

Commit e1cd5b9

Browse files
committed
fix(esp_security): Fix build failure when dpa protection at startup is disabled
1 parent 39872a5 commit e1cd5b9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

components/esp_security/src/esp_dpa_protection.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ static inline void esp_crypto_dpa_set_level(esp_crypto_dpa_sec_level_t level)
1616
REG_SET_FIELD(HP_SYSTEM_SEC_DPA_CONF_REG, HP_SYSTEM_SEC_DPA_LEVEL, level);
1717
}
1818

19+
#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
1920
void esp_crypto_dpa_protection_startup(void)
2021
{
2122
esp_crypto_dpa_set_level(CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL);
2223
}
24+
#endif
2325

2426
void esp_crypto_dpa_protection_enable(esp_crypto_dpa_sec_level_t level)
2527
{

components/esp_security/src/esp_security_priv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
*/
66

77
#pragma once
8+
#include "sdkconfig.h"
89

910
/* Private interface file */
1011

12+
#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
1113
void esp_crypto_dpa_protection_startup(void);
14+
#endif

0 commit comments

Comments
 (0)