psa_crypto_aead: add guard for CIPHER_C dependency
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/library/psa_crypto_cipher.c b/library/psa_crypto_cipher.c
index b997a07..c881d65 100644
--- a/library/psa_crypto_cipher.c
+++ b/library/psa_crypto_cipher.c
@@ -31,6 +31,7 @@
#include <string.h>
+#if defined(MBEDTLS_CIPHER_C)
const mbedtls_cipher_info_t *mbedtls_cipher_info_from_psa(
psa_algorithm_t alg,
psa_key_type_t key_type,
@@ -158,6 +159,7 @@
return mbedtls_cipher_info_from_values(cipher_id_tmp,
(int) key_bits, mode);
}
+#endif /* MBEDTLS_CIPHER_C */
#if defined(MBEDTLS_PSA_BUILTIN_CIPHER)