aboutsummaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/hash.c b/hash.c
index 2c745a8..fa30b60 100644
--- a/hash.c
+++ b/hash.c
@@ -443,10 +443,7 @@ hal_error_t hal_hash_initialize(hal_core_t *core,
state->descriptor = descriptor;
state->driver = driver;
state->core = core;
- state->flags = flags;
-
- if (state_buffer == NULL)
- state->flags |= STATE_FLAG_STATE_ALLOCATED;
+ state->flags = flags | STATE_FLAG_STATE_ALLOCATED;
*state_ = state;
@@ -777,9 +774,6 @@ hal_error_t hal_hmac_initialize(hal_core_t *core,
sizeof(state->hash_state))) != HAL_OK)
goto fail;
- if (state_buffer == NULL)
- h->flags |= STATE_FLAG_STATE_ALLOCATED;
-
/*
* If the supplied HMAC key is longer than the hash block length, we
* need to hash the supplied HMAC key to get the real HMAC key.