Skip to content

Commit 66db081

Browse files
committed
SHA256: build only if OTA is enabled
1 parent 8dadbb0 commit 66db081

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/tls/utility/SHA256.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#include "SHA256.h"
2323

24+
#if OTA_ENABLED
25+
2426
/******************************************************************************
2527
* STATIC MEMBER DECLARATION
2628
******************************************************************************/
@@ -58,3 +60,5 @@ void SHA256::finalize(uint8_t * hash)
5860
mbedtls_sha256_finish(&_ctx, hash);
5961
#endif
6062
}
63+
64+
#endif /* OTA_ENABLED */

src/tls/utility/SHA256.h

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
******************************************************************************/
2424
#include <AIoTC_Config.h>
2525

26+
#if OTA_ENABLED
27+
2628
#if defined(BOARD_HAS_OFFLOADED_ECCX08) || defined(BOARD_HAS_ECCX08) || defined(BOARD_HAS_SOFTSE)
2729
#define HAS_BEARSSL
2830
#else
@@ -61,4 +63,6 @@ class SHA256
6163

6264
};
6365

66+
#endif /* OTA_ENABLED */
67+
6468
#endif /* ARDUINO_TLS_UTILITY_SHA256_H_ */

0 commit comments

Comments
 (0)