crypto: Improve PSA interface config file include

Remove the include of the config file in the middle of the crypto_sizes
header. This was additionaly guarded by a config this expected to be
set from a configuration file. So this include was only included if the
config was included, making it redundant and useless.

Move the only include from crypto_types header.
It is only needed in crypto_sizes at the moment, and finding it in a
different header other than where it is needed is very unexpected and
hard to find out when debugging. Also this relies on the order of
header includes which seems like an unneccesey dependency to have.

Move it to the main PSA header instead.
In mbedtls it is included in every header except for the for the main
PSA header. But instead of doing the same having it in the main
header should be enough.

Change-Id: I953fe44a68788dc926a4f726a0408767886c5146
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
diff --git a/interface/include/psa/crypto.h b/interface/include/psa/crypto.h
index c5b1dbd..10480fa 100644
--- a/interface/include/psa/crypto.h
+++ b/interface/include/psa/crypto.h
@@ -12,6 +12,17 @@
 #ifndef PSA_CRYPTO_H
 #define PSA_CRYPTO_H
 
+/* In Mbed TLS, we would query the current config through inclusion of
+ * mbedtls/build_info.h, but in TF-M, we don't rely on build_info.h
+ * hence we just include the current configuration if it has been passed
+ * through command line. These config defines are required in crypto_sizes.h
+ * to compute macros that define sizes which depend on algorithms supported
+ * by the implementation
+ */
+#if defined(MBEDTLS_PSA_CRYPTO_CONFIG_FILE)
+#include MBEDTLS_PSA_CRYPTO_CONFIG_FILE
+#endif /* MBEDTLS_PSA_CRYPTO_CONFIG_FILE */
+
 #if defined(MBEDTLS_PSA_CRYPTO_PLATFORM_FILE)
 #include MBEDTLS_PSA_CRYPTO_PLATFORM_FILE
 #else