Collect the algorithms

Use Algorithm from crypto_knowledge to use its functionality.

Signed-off-by: Gabor Mezei <gabor.mezei@arm.com>
diff --git a/tests/scripts/depends.py b/tests/scripts/depends.py
index 2ad01ad..1ff6a02 100755
--- a/tests/scripts/depends.py
+++ b/tests/scripts/depends.py
@@ -56,6 +56,8 @@
 import scripts_path # pylint: disable=unused-import
 import config
 from mbedtls_framework import c_build_helper
+from mbedtls_framework import crypto_knowledge
+from mbedtls_framework import psa_information
 
 class Colors: # pylint: disable=too-few-public-methods
     """Minimalistic support for colored output.
@@ -481,6 +483,12 @@
         build_command = [options.make_command, 'CFLAGS=-Werror -O2']
         build_and_test = [build_command, [options.make_command, 'test']]
         self.all_config_symbols = set(conf.settings.keys())
+        psa_info = psa_information.Information().constructors
+        algs = {crypto_knowledge.Algorithm(alg): symbol
+                for alg, symbol in ((alg, psa_information.psa_want_symbol(alg))
+                                    for alg in psa_info.algorithms)
+                if symbol in self.all_config_symbols}
+
         # Find hash modules by name.
         hash_symbols = self.config_symbols_matching(r'MBEDTLS_(MD|RIPEMD|SHA)[0-9]+_C\Z')
         # Find elliptic curve enabling macros by name.