fix(psa): guard Crypto APIs with CRYPTO_SUPPORT
When building Crypto APIs, it requires dependency on external headers,
e.g., Mbedtls headers. Without the CRYPTO_SUPPORT configuration,
external dependencies are not set up, building Crypto APIs will fail.
Guard Crypto APIs with the CRYPTO_SUPPORT configuration, to make sure
the code is built only for Crypto enabled case.
Change-Id: Iffe1220b0e6272586c46432b4f8d0512cb39b0b5
Signed-off-by: Leo Yan <leo.yan@arm.com>
diff --git a/include/lib/psa/rse_platform_api.h b/include/lib/psa/rse_platform_api.h
index 535001b..c9fdb55 100644
--- a/include/lib/psa/rse_platform_api.h
+++ b/include/lib/psa/rse_platform_api.h
@@ -11,7 +11,9 @@
#include <stdint.h>
#include "psa/error.h"
+#if CRYPTO_SUPPORT
#include <rse_crypto_defs.h>
+#endif
#define RSE_PLATFORM_API_ID_NV_READ (1010)
#define RSE_PLATFORM_API_ID_NV_INCREMENT (1011)
@@ -42,6 +44,7 @@
rse_platform_nv_counter_read(uint32_t counter_id,
uint32_t size, uint8_t *val);
+#if CRYPTO_SUPPORT
/*
* Reads the public key or the public part of a key pair in binary format.
*
@@ -56,5 +59,6 @@
psa_status_t
rse_platform_key_read(enum rse_key_id_builtin_t key, uint8_t *data,
size_t data_size, size_t *data_length);
+#endif
#endif /* RSE_PLATFORM_API_H */