aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/hal_crypto.c
diff options
context:
space:
mode:
authorTheodore Ateba <tf.ateba@gmail.com>2018-06-12 11:55:00 +0000
committerTheodore Ateba <tf.ateba@gmail.com>2018-06-12 11:55:00 +0000
commitd96d3fbf325393f50ac10ffd92258d47dc7e3cc7 (patch)
tree0cc7b75175151a2d594bbd58ce93d8c07304102f /os/hal/src/hal_crypto.c
parent474bc51a14c162376e2c191bf2c92abd9b4b52a0 (diff)
downloadChibiOS-d96d3fbf325393f50ac10ffd92258d47dc7e3cc7.tar.gz
ChibiOS-d96d3fbf325393f50ac10ffd92258d47dc7e3cc7.tar.bz2
ChibiOS-d96d3fbf325393f50ac10ffd92258d47dc7e3cc7.zip
Add conditional compilation to resolve the compilation error (error: unknown type name)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12087 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal/src/hal_crypto.c')
-rw-r--r--os/hal/src/hal_crypto.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/src/hal_crypto.c b/os/hal/src/hal_crypto.c
index ff6931074..25e3aa553 100644
--- a/os/hal/src/hal_crypto.c
+++ b/os/hal/src/hal_crypto.c
@@ -1418,6 +1418,7 @@ cryerror_t crySHA512Final(CRYDriver *cryp, SHA512Context *sha512ctxp,
#endif
}
+#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
/**
* @brief Hash initialization using HMAC_SHA256.
* @note Use of this algorithm is not recommended because proven weak.
@@ -1523,7 +1524,9 @@ cryerror_t cryHMACSHA256Final(CRYDriver *cryp,
return CRY_ERR_INV_ALGO;
#endif
}
+#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
+#if (CRY_LLD_SUPPORTS_HMAC_SHA256 == TRUE) || defined(__DOXYGEN__)
/**
* @brief Hash initialization using HMAC_SHA512.
* @note Use of this algorithm is not recommended because proven weak.
@@ -1629,6 +1632,7 @@ cryerror_t cryHMACSHA512Final(CRYDriver *cryp,
return CRY_ERR_INV_ALGO;
#endif
}
+#endif /* CRY_LLD_SUPPORTS_HMAC_SHA256 */
/**
* @brief True random numbers generator.