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

Link OpenSSL in OP-TEE TA #7209

Open
Palatrauss00 opened this issue Jan 8, 2025 · 3 comments
Open

Link OpenSSL in OP-TEE TA #7209

Palatrauss00 opened this issue Jan 8, 2025 · 3 comments

Comments

@Palatrauss00
Copy link

Palatrauss00 commented Jan 8, 2025

Hi, I'm trying to add Liboqs library inside OPTEE, but it depends on OpenSSL Library. For example, I used to compile it with a cross-compiler with toolchain of optee but it gives undefined references

/home/ettore/optee_linaro/build/../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: 
KeccakP-1600-opt64.c: .text.KeccakP1600_AddBytes+0x136): undefined reference to `__memcpy_chk'                                                                                            

/home/ettore/optee_linaro/build/../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: /home/ettore/optee_linaro/optee_os/out/arm/export-ta_arm32/lib/liboqs.a(ossl_helpers.c.o): in function `oqs_sha512':
ossl_helpers.c:(.text.oqs_sha512+0xa): undefined reference to `pthread_once'

/home/ettore/optee_linaro/build/../toolchains/aarch32/bin/arm-linux-gnueabihf-ld.bfd: ossl_helpers.c:(.text.free_ossl_objects+0x36): undefined reference to `EVP_MD_free'

These 3 are only examples of undefined references inside. There is a way to link OpenSSL to TAs? I have also noticed that during compilation, OpenSSL is configured. Where it is saved and why it is not inside the toolchain?

I also tried to compile it inside optee_os but it said that some files like immintrin.h are missing.

@etienne-lms
Copy link
Contributor

Supporting OpenSSL inside OP-TEE seems quite difficult. Have a look at #6588, #6411, #5884, ...

@Palatrauss00
Copy link
Author

Instead for libraries like posix and libgc there is a solution of how to link them in the TA?

@jenswi-linaro
Copy link
Contributor

They first must be compiled for a TA environment, as provided in the TA dev kit, for instance, optee_os/out/arm/export-ta_arm64.

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