diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2019-03-27 11:31:48 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome.forissier@linaro.org> | 2019-03-28 14:11:23 +0100 |
commit | a1cbb728630308fcf902a8953a32cc972d14757e (patch) | |
tree | 45ecc8a88a51527b68fb9c06844f40e41e5d6eb4 /core/lib/libtomcrypt/hash.c | |
parent | 5edbd86a96a09538b07ec1f6c5db4277e1c82e96 (diff) |
core: LTC use only _CFG_CORE_LTC_ variables
LTC is only taking _CFG_CORE_LTC_ prefixed variables into account for
configuration.
_CFG_CORE_LTC_ prefixed variables are assigned based on CFG_CRYPTO_ and
other variables for unchanged LTC configuration.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'core/lib/libtomcrypt/hash.c')
-rw-r--r-- | core/lib/libtomcrypt/hash.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/lib/libtomcrypt/hash.c b/core/lib/libtomcrypt/hash.c index c757515d..c2f7dcda 100644 --- a/core/lib/libtomcrypt/hash.c +++ b/core/lib/libtomcrypt/hash.c @@ -125,49 +125,49 @@ static TEE_Result ltc_hash_alloc_ctx(struct crypto_hash_ctx **ctx_ret, return TEE_SUCCESS; } -#if defined(CFG_CRYPTO_MD5) +#if defined(_CFG_CORE_LTC_MD5) TEE_Result crypto_md5_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("md5")); } #endif -#if defined(CFG_CRYPTO_SHA1) +#if defined(_CFG_CORE_LTC_SHA1) TEE_Result crypto_sha1_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("sha1")); } #endif -#if defined(CFG_CRYPTO_SHA224) +#if defined(_CFG_CORE_LTC_SHA224) TEE_Result crypto_sha224_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("sha224")); } #endif -#if defined(CFG_CRYPTO_SHA256) +#if defined(_CFG_CORE_LTC_SHA256) TEE_Result crypto_sha256_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("sha256")); } #endif -#if defined(CFG_CRYPTO_SHA384) +#if defined(_CFG_CORE_LTC_SHA384) TEE_Result crypto_sha384_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("sha384")); } #endif -#if defined(CFG_CRYPTO_SHA512) +#if defined(_CFG_CORE_LTC_SHA512) TEE_Result crypto_sha512_alloc_ctx(struct crypto_hash_ctx **ctx) { return ltc_hash_alloc_ctx(ctx, find_hash("sha512")); } #endif -#if defined(CFG_CRYPTO_SHA256) +#if defined(_CFG_CORE_LTC_SHA256) TEE_Result hash_sha256_check(const uint8_t *hash, const uint8_t *data, size_t data_size) { @@ -186,7 +186,7 @@ TEE_Result hash_sha256_check(const uint8_t *hash, const uint8_t *data, } #endif -#if defined(CFG_CRYPTO_SHA512_256) +#if defined(_CFG_CORE_LTC_SHA512_256) TEE_Result hash_sha512_256_compute(uint8_t *digest, const uint8_t *data, size_t data_size) { |