From afa5b0168e8b373a5a64ae9b0e8de457c6f97416 Mon Sep 17 00:00:00 2001
From: Daniel Pouzzner <douzzer@wolfssl.com>
Date: Wed, 23 Oct 2024 12:46:32 -0500
Subject: [PATCH] fix HAVE_SHA* configurations in IDE/iotsafe/user_settings.h
 to also set WOLFSSL_SHA*, and in IDE/STM32Cube/default_conf.ftl,
 IDE/iotsafe/user_settings.h, and examples/configs/user_settings_stm32.h,
 comment HAVE_SHA* as "old freeRTOS settings.h requires this".

---
 IDE/STM32Cube/default_conf.ftl         | 2 +-
 IDE/iotsafe/user_settings.h            | 6 ++++--
 examples/configs/user_settings_stm32.h | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/IDE/STM32Cube/default_conf.ftl b/IDE/STM32Cube/default_conf.ftl
index 6041dc90a1..3c77d687d9 100644
--- a/IDE/STM32Cube/default_conf.ftl
+++ b/IDE/STM32Cube/default_conf.ftl
@@ -539,7 +539,7 @@ extern ${variable.value} ${variable.name};
     //#define USE_SLOW_SHA512
 
     #define WOLFSSL_SHA512
-    #define HAVE_SHA512 /* freeRTOS settings.h requires this */
+    #define HAVE_SHA512 /* old freeRTOS settings.h requires this */
 #endif
 
 /* Sha2-384 */
diff --git a/IDE/iotsafe/user_settings.h b/IDE/iotsafe/user_settings.h
index 368a76ed43..a03361a008 100644
--- a/IDE/iotsafe/user_settings.h
+++ b/IDE/iotsafe/user_settings.h
@@ -150,8 +150,10 @@ static inline long XTIME(long *x) { return jiffies;}
 #define WOLFSSL_AES_DIRECT
 
 /* Hashing */
-#define HAVE_SHA384
-#define HAVE_SHA512
+#define WOLFSSL_SHA384
+#define HAVE_SHA384 /* old freeRTOS settings.h requires this */
+#define WOLFSSL_SHA512
+#define HAVE_SHA512 /* old freeRTOS settings.h requires this */
 #define HAVE_HKDF
 
 /* TLS */
diff --git a/examples/configs/user_settings_stm32.h b/examples/configs/user_settings_stm32.h
index b0182ae447..eb7822f27d 100644
--- a/examples/configs/user_settings_stm32.h
+++ b/examples/configs/user_settings_stm32.h
@@ -602,7 +602,7 @@ extern "C" {
     //#define USE_SLOW_SHA512
 
     #define WOLFSSL_SHA512
-    #define HAVE_SHA512 /* freeRTOS settings.h requires this */
+    #define HAVE_SHA512 /* old freeRTOS settings.h requires this */
 #endif
 
 /* Sha2-384 */