aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2018-07-16 14:02:57 -0400
committerRob Austein <sra@hactrn.net>2018-07-16 14:02:57 -0400
commit64d415775323dd8a435a0db3548d6b642df4ad99 (patch)
treed5775839c0e8b694fb092fe6b7946cc05bfea389
parentdbd5f984d93e0c1a94afe54882c1aeecd510784d (diff)
No-op out core alloc/free when no cores exist.
-rw-r--r--hash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index e143e49..cb9eb1f 100644
--- a/hash.c
+++ b/hash.c
@@ -80,6 +80,11 @@ static hal_error_t sw_hash_core_sha512(hal_hash_state_t *);
#endif /* HAL_ENABLE_SOFTWARE_HASH_CORES */
+#if HAL_ONLY_USE_SOFTWARE_HASH_CORES
+#define hal_core_alloc(x, y, z) HAL_ERROR_CORE_NOT_FOUND
+#define hal_core_free(x)
+#endif
+
/*
* HMAC magic numbers.
*/