Skip to content

Add WOLFSSL_OPTEE for building wolfCrypt into an OP-TEE trusted application - #11919

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
dgarske:optee_port
Oct 29, 2026
Merged

philljj merged 1 commit into
wolfSSL:masterfrom
dgarske:optee_port

Conversation

@dgarske

@dgarske dgarske commented Oct 29, 2026

Copy link
Copy Markdown
Member

Description

An OP-TEE trusted application links libutee, not a C library: no descriptors, sockets, directories or wall clock, and a single thread.

  • settings.h - a WOLFSSL_OPTEE block beside WOLFSSL_SGX, setting NO_FILESYSTEM, SINGLE_THREADED, NO_ASN_TIME and the related no-IO options.
  • wc_port.c - adds !defined(WOLFSSL_OPTEE) to the CLOEXEC helper gate, which already excludes WOLFSSL_KERNEL_MODE, WOLFSSL_ZEPHYR and WOLFSSL_SGX.

That gate keys off __unix__, which a Linux cross compiler predefines even for a TA, so the block compiled in and failed on missing fcntl.h.

Testing

Validated on an NVIDIA Jetson Orin Nano (L4T R36.4.4): wolfCrypt built into a TA, ML-DSA and ML-KEM run in the secure world and cross-checked on the host. The TA does not build without the macro. Linux default, --enable-all and --enable-cryptonly builds are unaffected; make check passes.

@dgarske dgarske self-assigned this Oct 29, 2026
@dgarske dgarske assigned wolfSSL-Bot and unassigned dgarske Oct 29, 2026
@dgarske
dgarske requested a review from philljj October 29, 2026 04:31
@philljj philljj self-assigned this Oct 29, 2026
@philljj
philljj merged commit a5ab50f into wolfSSL:master Oct 29, 2026
432 checks passed
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

Successfully merging this pull request may close these issues.

3 participants