Crypto: Add option to disable separate modules

This patch introduces the configuration option in
the Crypto service to allow disabling at build time
of different submodules, such as Cipher, Hash, Mac,
Generator, Aead and Asymmetric.

Change-Id: I3ccfde15cfe2cb6fd540815ad4a47fb24a98ada9
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
diff --git a/secure_fw/services/crypto/CMakeLists.inc b/secure_fw/services/crypto/CMakeLists.inc
index fafbd30..5f68827 100644
--- a/secure_fw/services/crypto/CMakeLists.inc
+++ b/secure_fw/services/crypto/CMakeLists.inc
@@ -76,6 +76,48 @@
   else()
     message("- CRYPTO_CONC_OPER_NUM: " ${CRYPTO_CONC_OPER_NUM})
   endif()
+  if (NOT DEFINED CRYPTO_KEY_MODULE_DISABLED)
+    message("- KEY module enabled")
+    set(CRYPTO_KEY_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_KEY_MODULE_DISABLED: " ${CRYPTO_KEY_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_AEAD_MODULE_DISABLED)
+    message("- AEAD module enabled")
+    set(CRYPTO_AEAD_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_AEAD_MODULE_DISABLED: " ${CRYPTO_AEAD_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_MAC_MODULE_DISABLED)
+    message("- MAC module enabled")
+    set(CRYPTO_MAC_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_MAC_MODULE_DISABLED: " ${CRYPTO_MAC_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_HASH_MODULE_DISABLED)
+    message("- HASH module enabled")
+    set(CRYPTO_HASH_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_HASH_MODULE_DISABLED: " ${CRYPTO_HASH_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_CIPHER_MODULE_DISABLED)
+    message("- CIPHER module enabled")
+    set(CRYPTO_CIPHER_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_CIPHER_MODULE_DISABLED: " ${CRYPTO_CIPHER_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_GENERATOR_MODULE_DISABLED)
+    message("- GENERATOR module enabled")
+    set(CRYPTO_GENERATOR_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_GENERATOR_MODULE_DISABLED: " ${CRYPTO_GENERATOR_MODULE_DISABLED})
+  endif()
+  if (NOT DEFINED CRYPTO_ASYMMETRIC_MODULE_DISABLED)
+    message("- ASYMMETRIC module enabled")
+    set(CRYPTO_ASYMMETRIC_MODULE_DISABLED 0)
+  else()
+    message("- CRYPTO_ASYMMETRIC_MODULE_DISABLED: " ${CRYPTO_ASYMMETRIC_MODULE_DISABLED})
+  endif()
   if (TFM_PSA_API)
     if (NOT DEFINED CRYPTO_IOVEC_BUFFER_SIZE)
       message("- CRYPTO_IOVEC_BUFFER_SIZE using default value")