Modify config option for SHA384.

Although SHA512 is currently required to enable SHA384, this
is expected to change in the future. This commit is an
intermediate step towards fully separating SHA384 and SHA512.

check_config is the only module which enforces that SHA512 is
enabled together with SHA384.

Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
diff --git a/configs/config-no-entropy.h b/configs/config-no-entropy.h
index f92d9c3..24822ea 100644
--- a/configs/config-no-entropy.h
+++ b/configs/config-no-entropy.h
@@ -75,6 +75,7 @@
 #define MBEDTLS_RSA_C
 #define MBEDTLS_SHA256_C
 #define MBEDTLS_SHA512_C
+#define MBEDTLS_SHA384_C
 #define MBEDTLS_VERSION_C
 #define MBEDTLS_X509_USE_C
 #define MBEDTLS_X509_CRT_PARSE_C
diff --git a/configs/config-psa-crypto.h b/configs/config-psa-crypto.h
index 29c6d14..f37007a 100644
--- a/configs/config-psa-crypto.h
+++ b/configs/config-psa-crypto.h
@@ -1250,6 +1250,17 @@
 //#define MBEDTLS_SHA256_SMALLER
 
 /**
+ * \def MBEDTLS_SHA384_C
+ *
+ * Enable the SHA-384 option of the SHA-512 module.
+ *
+ * Requires: MBEDTLS_SHA512_C
+ *
+ * Comment to disable SHA-384
+ */
+#define MBEDTLS_SHA384_C
+
+/**
  * \def MBEDTLS_SSL_ALL_ALERT_MESSAGES
  *
  * Enable sending of alert messages in case of encountered errors as per RFC.
@@ -2632,7 +2643,7 @@
 /**
  * \def MBEDTLS_SHA512_C
  *
- * Enable the SHA-384 and SHA-512 cryptographic hash algorithms.
+ * Enable SHA-512 cryptographic hash algorithms.
  *
  * Module:  library/sha512.c
  * Caller:  library/entropy.c
@@ -2640,7 +2651,8 @@
  *          library/ssl_cli.c
  *          library/ssl_srv.c
  *
- * This module adds support for SHA-384 and SHA-512.
+ * This module adds support for SHA-512.
+ * This module is required for SHA-384.
  */
 #define MBEDTLS_SHA512_C
 
diff --git a/configs/config-suite-b.h b/configs/config-suite-b.h
index 7cb566c..986d042 100644
--- a/configs/config-suite-b.h
+++ b/configs/config-suite-b.h
@@ -65,6 +65,7 @@
 #define MBEDTLS_PK_PARSE_C
 #define MBEDTLS_SHA256_C
 #define MBEDTLS_SHA512_C
+#define MBEDTLS_SHA384_C
 #define MBEDTLS_SSL_CLI_C
 #define MBEDTLS_SSL_SRV_C
 #define MBEDTLS_SSL_TLS_C
diff --git a/configs/config-symmetric-only.h b/configs/config-symmetric-only.h
index 8a289cd..28150d6 100644
--- a/configs/config-symmetric-only.h
+++ b/configs/config-symmetric-only.h
@@ -86,6 +86,7 @@
 #define MBEDTLS_SHA1_C
 #define MBEDTLS_SHA256_C
 #define MBEDTLS_SHA512_C
+#define MBEDTLS_SHA384_C
 //#define MBEDTLS_THREADING_C
 #define MBEDTLS_TIMING_C
 #define MBEDTLS_VERSION_C