-
Notifications
You must be signed in to change notification settings - Fork 651
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
secure_storage: fix tests #2494
secure_storage: fix tests #2494
Conversation
tomi-font
commented
Feb 13, 2025
•
edited
Loading
edited
2bffacd
to
ff3d3e5
Compare
ff3d3e5
to
9f0260a
Compare
@tomi-font Any update here? We see failures in CI with those tests. |
This is still a WIP. Part of the issues have been fixed. |
8854ce6
to
04dac73
Compare
04dac73
to
804577c
Compare
@nordic-piks FYI everything is now fixed with nrfconnect/sdk-nrf#20710. |
Code looks ok, you just need to update the commit message for the dynamic slots as you did in the upstream pr. |
@tomi-font, will you add Zephyr's key ID distribution approach? |
Yeah, I'm planning to do the cherry picking again when the upstream PR is merged to have the commits be fromtrees.
Yes. I'll do all the changes at once. |
804577c
to
0be8c38
Compare
Converted the fromlists to fromtrees and rebased. |
0be8c38
to
e833532
Compare
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.
LGTM
This reverts commit 8a64a2e. We shouldn't have noups to fix things that can and should be fixed elsewhere/differently. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
This reverts commit fcb4238. We shouldn't have noups to fix things that can and should be fixed elsewhere/differently. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
…ofile TF-M small profile does not support secure storage (know as Protected storage), this commit add filter for tfm test case to pass it incase of small profile been set, see tf-m profiles in below link https://tf-m-user-guide.trustedfirmware.org/configuration/profiles/index.html Signed-off-by: Sadik Ozer <sadik.ozer@analog.com> (cherry picked from commit 6932885) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
…nabled scenarios Explicitly set the TF-M profile to not rely on the build system defaults which might differ. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit 62fe34dd02f053fc2fe0feb44dd5cb874a9c1a37) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
The psa_key_attributes_t type is implementation-defined according to the PSA Crypto spec. Compare its fields individually instead of doing a memcmp() over the entire struct. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit 744e9f70f44af3386be079e79189f946465f8517) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
…ples/tests Explicitly enable CONFIG_ENTROPY_GENERATOR instead of relying on the build system's defaults. This: - Makes sure the filtering works properly between entropy_driver and entropy_not_secure test scenarios for the samples. - Helps with TF-M builds in certain scenarios where key generation (via `psa_generate_key()`) would fail due to the RNG functionality being disabled. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit 25ad578694b7e3f6eb74a78f7e219a576845ea24) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Use dynamic allocation for key material for better compatibility as a fully static key store is a new feature that not all PSA Crypto implementations support. Explicitly enable CONFIG_MBEDTLS_ENABLE_HEAP to ensure that Mbed TLS uses heap for the PSA keys' data (instead of failing at runtime). This will turn off CONFIG_MBEDTLS_PSA_STATIC_KEY_SLOTS, making the implementation default to dynamic key slots. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit eb1ed1205fbd2898b6b67988483bbbdd0449a5a9) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
…YPTO_STORAGE_C Add a Kconfig option to match the Mbed TLS define instead of defining it based on CONFIG_SECURE_STORAGE. This gives more flexibility regarding the potential re-definition of the CONFIG_MBEDTLS_PSA_CRYPTO_STORAGE_C Kconfig option. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit 8627250d3ce537593ae986b76c95ed35200cb5b9) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Some implementations require more stack than others. Increase the Ztest and main stack sizes to accommodate them. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit f50c3d9d261f4a3c82ffc262936396136ca062fd) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
On top of enabling and allowing test entropy sources, enable CONFIG_ENTROPY_GENERATOR so that a real driver and entropy source gets used if available. This is needed for some PSA Crypto implementations that have random number generation conditionally compiled in. Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no> (cherry picked from commit b920686812042da84bb485a91a2b7810ea5530b4) Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
e833532
to
d6fe2d1
Compare
|
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.
Still LGTM
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.
I checked and these are clean cherry picks.