Support per-deployment configuration of MbedTLS

Up until now, only libmbedcrypto has been used for builds of the
MbedTLS external component. In preparation for using other libraries
produced by MbedTLS (e.g. libmbedx509), this change moves the build
configuration to be defined by a deployment that depends on MbedTLS
in some way. This allows a deployment specific configuration to be
applied that impacts the complete set of mbedTLS library dependencies.
To allow for reuse of common configurations, a new config directory
has been added under external/MbedTLS to provide a home for reusable
config header files.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Signed-off-by: Gabor Toth <gabor.toth2@arm.com>
Change-Id: Icfdeb796d9bda185c30f68e525f7644f1edd4770
diff --git a/components/service/crypto/client/cpp/component.cmake b/components/service/crypto/client/cpp/component.cmake
index 9ee1738..25c59a6 100644
--- a/components/service/crypto/client/cpp/component.cmake
+++ b/components/service/crypto/client/cpp/component.cmake
@@ -1,5 +1,5 @@
 #-------------------------------------------------------------------------------
-# Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
+# Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 #
@@ -11,11 +11,3 @@
 target_sources(${TGT} PRIVATE
 	"${CMAKE_CURRENT_LIST_DIR}/crypto_client.cpp"
 	)
-
-# The crypto client presents the PSA Crypto API and hence has a dependency on mbedcrypto for functions
-# related to setting key attributes.  A minimal configuration is provided to allow a minimal library
-# to be built.  This configuration may be overridden by other components that have their own
-# dependency on mbedcrypto.
-set(MBEDTLS_USER_CONFIG_FILE
-	"${CMAKE_CURRENT_LIST_DIR}/config_mbedtls_user.h"
-	CACHE STRING "Configuration file for Mbed TLS")
diff --git a/components/service/crypto/client/cpp/config_mbedtls_user.h b/components/service/crypto/client/cpp/config_mbedtls_user.h
deleted file mode 100644
index 7b3134e..0000000
--- a/components/service/crypto/client/cpp/config_mbedtls_user.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-#ifndef CONFIG_MBEDTLS_USER_H
-#define CONFIG_MBEDTLS_USER_H
-
-/* Mbed TLS configuration for using libmbedcrypto in
- * a Posix environment.  Supported crypto operations
- * are configured separately via the PSA crypto build
- * interface (PSA_WANT_xxx).
- */
-#define MBEDTLS_PSA_CRYPTO_CONFIG
-#define MBEDTLS_NO_UDBL_DIVISION
-#undef MBEDTLS_HAVE_TIME
-#undef MBEDTLS_HAVE_TIME_DATE
-#undef MBEDTLS_FS_IO
-#undef MBEDTLS_SELF_TEST
-#undef MBEDTLS_AESNI_C
-#undef MBEDTLS_PADLOCK_C
-#undef MBEDTLS_PLATFORM_C
-#undef MBEDTLS_PSA_CRYPTO_STORAGE_C
-#undef MBEDTLS_PSA_ITS_FILE_C
-#undef MBEDTLS_TIMING_C
-
-#endif /* CONFIG_MBEDTLS_USER_H */