Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when replace tomcrypt with mbedtls #7092

Open
huzai9527 opened this issue Oct 24, 2024 · 5 comments
Open

error when replace tomcrypt with mbedtls #7092

huzai9527 opened this issue Oct 24, 2024 · 5 comments

Comments

@huzai9527
Copy link

when i try to use mbedtls without tomcrypt,code change like below
image

then,i compile tee,error occurs
image

@jenswi-linaro
Copy link
Contributor

You've done something more because it works for me at the latest.

@guojh2xiaopeng
Copy link

I also meet that problem , when I change code as @huzai9527 , other I had config CFG_CRYPTO_WITH_CE := y. @jenswi-linaro

@jenswi-linaro
Copy link
Contributor

Still works for me with CFG_CRYPTOLIB_NAME=mbedtls CFG_CRYPTOLIB_DIR=lib/libmbedtls CFG_CRYPTO_WITH_CE=y for the qemu_armv8a variant. I can't help you if I can't reproduce the compile error.

@guojh2xiaopeng
Copy link

guojh2xiaopeng commented Nov 4, 2024

I test found that, when add config as follow , It build pass. can you show me your crypto.mk? @jenswi-linaro

index ac651eeb9..693c7820e 100644
--- a/core/crypto.mk
+++ b/core/crypto.mk
@@ -233,6 +233,7 @@ _CFG_CORE_LTC_SHA256_DESC := $(CFG_CRYPTO_DSA)
 _CFG_CORE_LTC_SHA384_DESC := $(CFG_CRYPTO_DSA)
 _CFG_CORE_LTC_SHA512_DESC := $(CFG_CRYPTO_DSA)
 _CFG_CORE_LTC_XTS := $(CFG_CRYPTO_XTS)
+_CFG_CORE_LTC_CTR := $(CFG_CRYPTO_CTR)
 _CFG_CORE_LTC_CCM := $(CFG_CRYPTO_CCM)
 _CFG_CORE_LTC_AES := $(call cfg-one-enabled, CFG_CRYPTO_XTS CFG_CRYPTO_CCM \
                                             CFG_CRYPTO_AES)

@jenswi-linaro
Copy link
Contributor

I'm compiling with https://github.com/OP-TEE/optee_os/blob/b7c039eb81db098d2bf18c44b2986d8bc5121ee4/core/crypto.mk

While the fix looks easy enough, I can't tell if it's fixing a symptom or a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants