crypto: Fix PSA max hash size without configuration header included

The PSA header only includes the configuration header when
MBEDTLS_PSA_CRYPTO_CONFIG_FILE is given on the command line.
If the configuration file has not been included assume that the
maximum hash size is the maximum possible instead of the minimal
possible.
This is consistent with how PSA_VENDOR_ECC_MAX_CURVE_BITS is defined.

Change-Id: I4c137a947ca0dbdbddf7eaac74e6ce59ae988224
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
diff --git a/interface/include/psa/crypto_sizes.h b/interface/include/psa/crypto_sizes.h
index 14aa6b5..79e4c5e 100644
--- a/interface/include/psa/crypto_sizes.h
+++ b/interface/include/psa/crypto_sizes.h
@@ -107,6 +107,7 @@
 /* Note: for HMAC-SHA-3, the block size is 144 bytes for HMAC-SHA3-226,
  * 136 bytes for HMAC-SHA3-256, 104 bytes for SHA3-384, 72 bytes for
  * HMAC-SHA3-512. */
+#if defined(MBEDTLS_PSA_CRYPTO_CONFIG)
 #if defined(PSA_WANT_ALG_SHA_512) || defined(PSA_WANT_ALG_SHA_384)
 #define PSA_HASH_MAX_SIZE 64
 #define PSA_HMAC_MAX_HASH_BLOCK_SIZE 128
@@ -114,6 +115,11 @@
 #define PSA_HASH_MAX_SIZE 32
 #define PSA_HMAC_MAX_HASH_BLOCK_SIZE 64
 #endif
+#else
+/* Without any PSA configuration we must assume the maximum size possible. */
+#define PSA_HASH_MAX_SIZE 64
+#define PSA_HMAC_MAX_HASH_BLOCK_SIZE 128
+#endif
 
 /** \def PSA_MAC_MAX_SIZE
  *
@@ -209,6 +215,7 @@
 #define PSA_VENDOR_ECC_MAX_CURVE_BITS 0
 #endif
 #else /* defined(MBEDTLS_PSA_CRYPTO_CONFIG)  */
+/* Without any PSA configuration we must assume the maximum size possible. */
 #define PSA_VENDOR_ECC_MAX_CURVE_BITS 521
 #endif /* defined(MBEDTLS_PSA_CRYPTO_CONFIG)  */