diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2015-07-22 14:27:51 +0200 |
---|---|---|
committer | Jens Wiklander <jens.wiklander@linaro.org> | 2015-07-22 16:36:57 +0200 |
commit | 60fc60b3f2a99ac39c4e3ce9f9020490a9b01e6c (patch) | |
tree | e99b3816a7810d51c9076660f5c9704f43a4fff7 /core/tee/tee_cryp_hkdf.c | |
parent | 5df9748224524a69d55ad837c06afde9d091b917 (diff) |
core: optimize size with const crypto_ops
Optimize size of unpaged data by making crypto_ops const.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
Diffstat (limited to 'core/tee/tee_cryp_hkdf.c')
-rw-r--r-- | core/tee/tee_cryp_hkdf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/tee/tee_cryp_hkdf.c b/core/tee/tee_cryp_hkdf.c index 5b34efee..d5287d97 100644 --- a/core/tee/tee_cryp_hkdf.c +++ b/core/tee/tee_cryp_hkdf.c @@ -44,7 +44,7 @@ static TEE_Result hkdf_extract(uint32_t hash_id, const uint8_t *ikm, void *ctx = NULL; uint32_t hash_algo = TEE_ALG_HASH_ALGO(hash_id); uint32_t hmac_algo = (TEE_OPERATION_MAC << 28) | hash_id; - struct mac_ops *m = &crypto_ops.mac; + const struct mac_ops *m = &crypto_ops.mac; if (!m->get_ctx_size || !m->init || !m->update) { res = TEE_ERROR_NOT_IMPLEMENTED; @@ -105,7 +105,7 @@ static TEE_Result hkdf_expand(uint32_t hash_id, const uint8_t *prk, size_t tn_len, hash_len, i, n, where, ctx_size; TEE_Result res = TEE_SUCCESS; void *ctx = NULL; - struct mac_ops *m = &crypto_ops.mac; + const struct mac_ops *m = &crypto_ops.mac; uint32_t hash_algo = TEE_ALG_HASH_ALGO(hash_id); uint32_t hmac_algo = TEE_ALG_HMAC_ALGO(hash_id); |