-
Notifications
You must be signed in to change notification settings - Fork 7.6k
secure_storage: improve expandability and other minor improvements #90395
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: improve expandability and other minor improvements #90395
Conversation
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 only have some concern with changes to secure_storage_its_transform_aead_get_key
, but the rest is OK to me.
8a3c261
to
a1984f4
Compare
LOG_DBG("%s %s. (%d)", ret ? "Failed to delete" : "Deleted", name, ret); | ||
return ret ? PSA_ERROR_STORAGE_FAILURE : PSA_SUCCESS; |
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.
Could explain a bit what is the purpose here? Why the ret here which is not a psa_status_t is returned as is? Especially since you already log the error before why you want to also propagate it?
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.
It's already logged here but only if debug logging is enabled.
The purpose here was to also have it logged as an error by the calling function if something goes wrong, as the default is to have debug logs off.
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.
Reverted this change and changed the way it's done in zms.c
to be aligned and clearer.
endif() | ||
if(CONFIG_SECURE_STORAGE_ITS_TRANSFORM_IMPLEMENTATION_AEAD) | ||
|
||
if((NOT CONFIG_SECURE_STORAGE_ITS_TRANSFORM_AEAD_SCHEME_AES_GCM |
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.
Looks ok overall but it would be nice to have a comment on the top of this if statement to describe a bit the cases that you are trying to cover her e since the if statement is now quite long. Just a high level description would be nice I think.
Some minor improvements. Signed-off-by: Tomi Fontanilles <[email protected]>
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 <[email protected]>
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 <[email protected]>
Instead of checking whether a custom implementation is present, check whether the AEAD one is used. This allows downstream users to expand the implementation choice with more options. Signed-off-by: Tomi Fontanilles <[email protected]>
a1984f4
to
7d12fd2
Compare
|
Allow users to create links to Kconfig regex searches. The new role generates links to the Kconfig search page with the regex pattern as the search query. Fixes zephyrproject-rtos#90395 Signed-off-by: Benjamin Cabé <[email protected]>
See commits.