diff --git a/core/crypto.mk b/core/crypto.mk index 368f1f83a69..ac651eeb94a 100644 --- a/core/crypto.mk +++ b/core/crypto.mk @@ -251,6 +251,8 @@ endif # libtomcrypt (LTC) specifics, phase #2 ############################################################### +_CFG_CORE_LTC_MD5_DESC := $(call cfg-one-enabled, _CFG_CORE_LTC_MD5_DESC \ + _CFG_CORE_LTC_MD5) _CFG_CORE_LTC_SHA1_DESC := $(call cfg-one-enabled, _CFG_CORE_LTC_SHA1_DESC \ _CFG_CORE_LTC_SHA1) _CFG_CORE_LTC_SHA224_DESC := $(call cfg-one-enabled, _CFG_CORE_LTC_SHA224_DESC \ diff --git a/core/lib/libtomcrypt/rsa.c b/core/lib/libtomcrypt/rsa.c index 4a2b1d8817c..f63bfe978f7 100644 --- a/core/lib/libtomcrypt/rsa.c +++ b/core/lib/libtomcrypt/rsa.c @@ -36,7 +36,7 @@ static TEE_Result tee_algo_to_ltc_hashindex(uint32_t algo, int *ltc_hashindex) *ltc_hashindex = find_hash("sha1"); break; #endif -#if defined(_CFG_CORE_LTC_MD5) +#if defined(_CFG_CORE_LTC_MD5_DESC) case TEE_ALG_RSASSA_PKCS1_V1_5_MD5: case TEE_ALG_RSASSA_PKCS1_PSS_MGF1_MD5: case TEE_ALG_RSAES_PKCS1_OAEP_MGF1_MD5: diff --git a/core/lib/libtomcrypt/src/hashes/sub.mk b/core/lib/libtomcrypt/src/hashes/sub.mk index d58f920f194..6a35fe2b819 100644 --- a/core/lib/libtomcrypt/src/hashes/sub.mk +++ b/core/lib/libtomcrypt/src/hashes/sub.mk @@ -1,4 +1,4 @@ -srcs-$(_CFG_CORE_LTC_MD5) += md5.c +srcs-$(_CFG_CORE_LTC_MD5_DESC) += md5.c ifeq ($(_CFG_CORE_LTC_SHA1_DESC),y) ifneq ($(_CFG_CORE_LTC_SHA1_ACCEL),y) diff --git a/core/lib/libtomcrypt/sub.mk b/core/lib/libtomcrypt/sub.mk index 08cb085076a..de11cccd847 100644 --- a/core/lib/libtomcrypt/sub.mk +++ b/core/lib/libtomcrypt/sub.mk @@ -36,7 +36,7 @@ endif cppflags-lib-y += -DLTC_NO_HASHES -ifeq ($(_CFG_CORE_LTC_MD5),y) +ifeq ($(_CFG_CORE_LTC_MD5_DESC),y) cppflags-lib-y += -DLTC_MD5 endif ifeq ($(_CFG_CORE_LTC_SHA1_DESC),y) diff --git a/core/lib/libtomcrypt/tomcrypt.c b/core/lib/libtomcrypt/tomcrypt.c index a7b58a35131..cdff8f30831 100644 --- a/core/lib/libtomcrypt/tomcrypt.c +++ b/core/lib/libtomcrypt/tomcrypt.c @@ -99,7 +99,7 @@ static void tee_ltc_reg_algs(void) register_cipher(&des_desc); register_cipher(&des3_desc); #endif -#if defined(_CFG_CORE_LTC_MD5) +#if defined(_CFG_CORE_LTC_MD5_DESC) register_hash(&md5_desc); #endif #if defined(_CFG_CORE_LTC_SHA1) || defined(_CFG_CORE_LTC_SHA1_DESC)