Commit Graph

11 Commits

Author SHA1 Message Date
Tomi Fontanilles
001d054bc3 secure_storage: its: make definitions available outside of transform.h
Some ITS store module implementations may make use of them.
This is the case of the custom one in the
secure_storage.psa.its.secure_storage.custom.store test.

Instead of making transform.h conditionally available, move the definitions
to common.h and simply make them available whenever the ITS transform
module is enabled.

At the same time, remove unneeded/redundant includes/build asserts.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-05-27 15:46:37 +02:00
Tomi Fontanilles
9379678fcf secure_storage: its: transform: aead: improve expandability
Instead of checking for CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_*_CUSTOM,
check for any of the existing providers.
This allows downstream users to expand the choices with more options

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-05-27 15:46:37 +02:00
Tomi Fontanilles
b87befb36b secure_storage: its: improve return codes
Some minor improvements.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-05-27 15:46:37 +02:00
Tomi Fontanilles
fd538dcb11 secure_storage: its: store: settings: allow using custom setting names
Allow replacing the default naming scheme of the stored settings by
providing a custom function that fills a name buffer based on the ITS
entry UID.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-08 14:22:59 +02:00
Tomi Fontanilles
09228de9a1 secure_storage: fix formatting of CMake ifs
The rule says there must not be spaces "between a command and the opening
parenthesis".

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-04-08 14:22:59 +02:00
Frank Audun Kvamtrø
202c2c41ab secure storage: Add missing include for mbedtls_platform_zeroize
-Adding explicit include for mbedtls/platform_util.h to get acces
 to mbedtls_platform_zeroize in ITS. Somehow not visibile in Zephyr but
 it caused build issues in nRF Connect SDK.

Signed-off-by: Frank Audun Kvamtrø <frank.kvamtro@nordicsemi.no>
2025-01-27 21:04:20 +01:00
Tomi Fontanilles
23a6a78599 secure_storage: its: store: settings: improve debug logging
Align the debug logging with that of the ZMS-based implementation.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Tomi Fontanilles
bb003f7bd3 secure_storage: warn when there is no ITS store module implementation
Output a CMake error when the ITS store module is enabled but no
implementation ended up enabled (due to unfulfilled prerequisites).
This is to make it more clear than undefined references at link time.
Not a fatal error because CMake cannot fail for the twister filtering
to work on the tests.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Tomi Fontanilles
3eba06d559 secure_storage: its: store: settings: stop using SETTINGS_MAX_VAL_LEN
Remove the hard restriction on CONFIG_SECURE_STORAGE_ITS_MAX_DATA_SIZE.
SETTINGS_MAX_VAL_LEN is in practice not used by any settings backend
implementation.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Tomi Fontanilles
0ea6f352e7 secure_storage: add a ZMS-based implementation of the ITS store module
It becomes the new default when the secure_storage_its_partition
devicetree chosen property is defined as it is a preferred alternative.

See the help message of the
`CONFIG_SECURE_STORAGE_ITS_STORE_IMPLEMENTATION_ZMS` Kconfig option
for more information.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-12-17 11:34:42 +00:00
Tomi Fontanilles
bf0e6d7c83 secure_storage: introduce the secure storage subsystem
Implements RFC https://github.com/zephyrproject-rtos/zephyr/issues/75275.

See also the PR (https://github.com/zephyrproject-rtos/zephyr/pull/76222)
for more information.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00