Skip to content

Commit

Permalink
SHA256: build only if OTA is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Aug 12, 2024
1 parent 9780027 commit 74de9b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tls/utility/SHA256.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

#include "SHA256.h"

#if OTA_ENABLED

/******************************************************************************
* STATIC MEMBER DECLARATION
******************************************************************************/
Expand Down Expand Up @@ -58,3 +60,5 @@ void SHA256::finalize(uint8_t * hash)
mbedtls_sha256_finish(&_ctx, hash);
#endif
}

#endif /* OTA_ENABLED */
4 changes: 4 additions & 0 deletions src/tls/utility/SHA256.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
******************************************************************************/
#include <AIoTC_Config.h>

#if OTA_ENABLED

#if defined(BOARD_HAS_OFFLOADED_ECCX08) || defined(BOARD_HAS_ECCX08) || defined(BOARD_HAS_SOFTSE)
#define HAS_BEARSSL
#else
Expand Down Expand Up @@ -61,4 +63,6 @@ class SHA256

};

#endif /* OTA_ENABLED */

#endif /* ARDUINO_TLS_UTILITY_SHA256_H_ */

0 comments on commit 74de9b6

Please sign in to comment.