fix(esp_security): Fix build failure when dpa protection at startup is disabled

This commit is contained in:
harshal.patil
2024-09-04 13:22:07 +05:30
parent 39872a5575
commit e1cd5b909e
2 changed files with 5 additions and 0 deletions

View File

@@ -16,10 +16,12 @@ static inline void esp_crypto_dpa_set_level(esp_crypto_dpa_sec_level_t level)
REG_SET_FIELD(HP_SYSTEM_SEC_DPA_CONF_REG, HP_SYSTEM_SEC_DPA_LEVEL, level); REG_SET_FIELD(HP_SYSTEM_SEC_DPA_CONF_REG, HP_SYSTEM_SEC_DPA_LEVEL, level);
} }
#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
void esp_crypto_dpa_protection_startup(void) void esp_crypto_dpa_protection_startup(void)
{ {
esp_crypto_dpa_set_level(CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL); esp_crypto_dpa_set_level(CONFIG_ESP_CRYPTO_DPA_PROTECTION_LEVEL);
} }
#endif
void esp_crypto_dpa_protection_enable(esp_crypto_dpa_sec_level_t level) void esp_crypto_dpa_protection_enable(esp_crypto_dpa_sec_level_t level)
{ {

View File

@@ -5,7 +5,10 @@
*/ */
#pragma once #pragma once
#include "sdkconfig.h"
/* Private interface file */ /* Private interface file */
#if CONFIG_ESP_CRYPTO_DPA_PROTECTION_AT_STARTUP
void esp_crypto_dpa_protection_startup(void); void esp_crypto_dpa_protection_startup(void);
#endif