summaryrefslogtreecommitdiff
path: root/nuttx/crypto/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/crypto/crypto.c')
-rw-r--r--nuttx/crypto/crypto.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/nuttx/crypto/crypto.c b/nuttx/crypto/crypto.c
index b1978343b..b0c664097 100644
--- a/nuttx/crypto/crypto.c
+++ b/nuttx/crypto/crypto.c
@@ -66,21 +66,31 @@
void up_cryptoinitialize(void)
{
- int res = OK;
+#if defined(CONFIG_CRYPTO_AES) || defined(CONFIG_CRYPTO_ALGTEST)
+ int res;
-#if defined(CONFIG_CRYPTO_AES)
+#ifdef CONFIG_CRYPTO_AES
res = up_aesinitialize();
if (res)
- return res;
+ {
+ return res;
+ }
#endif
-#if defined(CONFIG_CRYPTO_ALGTEST)
+#if CONFIG_CRYPTO_ALGTEST
res = crypto_test();
if (res)
- cryptlldbg("crypto test failed\n");
+ {
+ cryptlldbg("crypto test failed\n");
+ }
else
- cryptllvdbg("crypto test OK\n");
+ {
+ cryptllvdbg("crypto test OK\n");
+ }
#endif
return res;
-} \ No newline at end of file
+#else
+ return OK;
+#endif
+}