Crypto: Add psa_can_do_cipher()
Similarly to what has been done for psa_can_do_hash() and for
the same root cause, exposing the same behaviour.
Signed-off-by: Antonio de Angelis <antonio.deangelis@arm.com>
Change-Id: I09e6adfb718951b17c6d3bf77e6b7f5cd1135e0d
diff --git a/interface/src/tfm_crypto_api.c b/interface/src/tfm_crypto_api.c
index bd13bd1..f0ff7e1 100644
--- a/interface/src/tfm_crypto_api.c
+++ b/interface/src/tfm_crypto_api.c
@@ -74,6 +74,17 @@
return (int)true;
}
+TFM_CRYPTO_API(int, psa_can_do_cipher)(psa_key_type_t key_type, psa_algorithm_t cipher_alg)
+{
+ (void)cipher_alg;
+ (void)key_type;
+ /* There isn't any cipher algorithm that would not be ready
+ * to be used after TF-M has booted up, hence this function
+ * just returns success all the time
+ */
+ return (int)true;
+}
+
TFM_CRYPTO_API(psa_status_t, psa_open_key)(psa_key_id_t id,
psa_key_id_t *key)
{