From 66db081186d865e2b5ed50831828492086544ad9 Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 12 Aug 2024 11:16:41 +0200 Subject: [PATCH] SHA256: build only if OTA is enabled --- src/tls/utility/SHA256.cpp | 4 ++++ src/tls/utility/SHA256.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/tls/utility/SHA256.cpp b/src/tls/utility/SHA256.cpp index d73438a4..6a363bf6 100644 --- a/src/tls/utility/SHA256.cpp +++ b/src/tls/utility/SHA256.cpp @@ -21,6 +21,8 @@ #include "SHA256.h" +#if OTA_ENABLED + /****************************************************************************** * STATIC MEMBER DECLARATION ******************************************************************************/ @@ -58,3 +60,5 @@ void SHA256::finalize(uint8_t * hash) mbedtls_sha256_finish(&_ctx, hash); #endif } + +#endif /* OTA_ENABLED */ diff --git a/src/tls/utility/SHA256.h b/src/tls/utility/SHA256.h index 774ec296..b1d5e3ea 100644 --- a/src/tls/utility/SHA256.h +++ b/src/tls/utility/SHA256.h @@ -23,6 +23,8 @@ ******************************************************************************/ #include +#if OTA_ENABLED + #if defined(BOARD_HAS_OFFLOADED_ECCX08) || defined(BOARD_HAS_ECCX08) || defined(BOARD_HAS_SOFTSE) #define HAS_BEARSSL #else @@ -61,4 +63,6 @@ class SHA256 }; +#endif /* OTA_ENABLED */ + #endif /* ARDUINO_TLS_UTILITY_SHA256_H_ */