tee/optee_supplicant: Added optee supplicant #3141
Merged
+591
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces to
nuttx-apps
, the OP-TEE supplicant. SinceLIBTEEC
already downloads a zip file containing the supplicant and the supplicant requiresLIBTEEC
, I decided to re-use the downloaded artifact from LIBTEEC and apply the supplicant patch on top of it, in theapps/tee/optee_supplicant/optee_client
directory.The build system will expect
CONFIG_OPTEE_SUPPLICANT_VERSION
to matchCONFIG_LIBTEEC_VERSION
otherwisethe build will abort with an error message.
The main reason this application is added, is to provide to OP-TEE secure storage. So an expected (and the currently tested) scenario is to run
optee_supplicant
as a background app in order to allow Trusted Applications (TAs) running in the OP-TEE to have access to secure files. These files are created on the nuttx side, but all their metadata and contents are only known to OP-TEE since they are encrypted before being "transferred" to nuttx.To enable the supplicant we need the following:
More info:
Impact
No impact to existing users.
Testing
To test the file creation I created 1 nuttx Client Application (CA) and one TA (they are out of scope of this PR and are not included in any way).
The CA invokes the TA by its uuid (
145f361e-40f3-11ee-be56-0242ac120002
in this example) and a specific custom function.In the following scenario the cmd
2
creates a file with some content and then closes the file.The cmd
3
opens the file by filename and prints the contents (which are the expected).For this to be possible the
optee_supplicant
must be running in the background.The logs follow: