Update SHA and MD5 dependencies in the SSL tests

The same elements are now also used when MBEDTLS_USE_PSA_CRYPTO
is defined and respective SHA / MD5 defines are missing.
A new set of macros added in #6065 is used to reflect these dependencies.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>

diff --git a/tests/suites/test_suite_ssl.function b/tests/suites/test_suite_ssl.function
index abab68c..97fb2dc 100644
--- a/tests/suites/test_suite_ssl.function
+++ b/tests/suites/test_suite_ssl.function
@@ -11,10 +11,12 @@
 #include "mbedtls/ssl_cache.h"
 #endif
 
-#include <psa/crypto.h>
+#if defined(MBEDTLS_USE_PSA_CRYPTO)
+#include "psa/crypto.h"
+#endif
+#include <legacy_or_psa.h>
 
 #include <constant_time_internal.h>
-
 #include <test/constant_flow.h>
 
 enum