-
Notifications
You must be signed in to change notification settings - Fork 8.3k
secure_storage: re-add MbedTLS backend #85840
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) 2025 Embeint Inc | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # We explicitly don't want SECURE_STORAGE_ITS_IMPLEMENTATION_MBEDTLS here | ||
| choice SECURE_STORAGE_ITS_IMPLEMENTATION | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_CUSTOM | ||
| endchoice | ||
|
|
||
| source "Kconfig.zephyr" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| CONFIG_SECURE_STORAGE=y | ||
| CONFIG_SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Copyright (c) 2025 Embeint Inc | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # We explicitly don't want SECURE_STORAGE_ITS_IMPLEMENTATION_MBEDTLS here | ||
| # as it implements `psa_ps_*` and not the underlying `secure_storage_its_*`. | ||
| choice SECURE_STORAGE_ITS_IMPLEMENTATION | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_CUSTOM | ||
| endchoice | ||
|
|
||
| source "Kconfig.zephyr" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Copyright (c) 2025 Embeint Inc | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # We explicitly don't want SECURE_STORAGE_ITS_IMPLEMENTATION_MBEDTLS here | ||
| choice SECURE_STORAGE_ITS_IMPLEMENTATION | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_ZEPHYR | ||
| default SECURE_STORAGE_ITS_IMPLEMENTATION_CUSTOM | ||
| endchoice | ||
|
|
||
| source "Kconfig.zephyr" |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: can't we make a new Mbed TLS specific Kconfig to be used as guard here instead of using a secure-storage one? Something like
CONFIG_MBEDTLS_ITS_FILEor similar for example.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course we could, but that symbol would just be:
It just smears the definitions across more files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but then you would have secure-storage Kconfig enabling an Mbed TLS Kconfig which then "internally" sets the build symbols to build Mbed TLS. In other words, in this way we would keep relations between different subsystems/modules at Kconfig level. It just looks cleaner to me, but I guess it's a matter of preference, so I'll let the maintaner decide what to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happy to change the symbols if needed, but literally 2 lines above my change there is already a:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh damn, that's right. Then I guess that it will take one or more specific PRs to fix all the mess in that header file, but that's out of scope for this one. Please ignore my comment and sorry for the noise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I am changing that in #85735 (introducing
CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C).