Skip to content
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

lib: Update identity_key and hw_uniq_key libraries to return error codes #11557

Merged
merged 3 commits into from
Jun 23, 2023

Conversation

Vge0rge
Copy link
Contributor

@Vge0rge Vge0rge commented Jun 19, 2023

Updates the two identity key and the hardware unique key libraries so that they don't panic but instead they return an error code. This will allow the application to handle the error as they seem fit.

Also removes the random_hw_unique_key sample since it is now redundant.

Ref: NCSDK-21839

@github-actions github-actions bot added changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. doc-required PR must not be merged without tech writer approval. labels Jun 19, 2023
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jun 19, 2023

Test specification

CI/Jenkins/NRF

  • Integration Platforms

CI/Jenkins/integration

Test Module File based changes Manually selected West overwrite
test-ci-nrfconnect-boot-fw-update X
test-fw-nrfconnect-nrf_crypto X
test-fw-nrfconnect-tfm X

Detailed information of selected test modules

Note: This message is automatically posted and updated by the CI

Copy link
Contributor

@mswarowsky mswarowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice UX improvement

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

Copy link
Contributor

@joerchan joerchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changelog entry required.

CODEOWNERS Outdated Show resolved Hide resolved
include/hw_unique_key.h Outdated Show resolved Hide resolved
include/hw_unique_key.h Outdated Show resolved Hide resolved
lib/hw_unique_key/hw_unique_key.c Show resolved Hide resolved
lib/hw_unique_key/hw_unique_key.c Outdated Show resolved Hide resolved
lib/hw_unique_key/hw_unique_key_acl.c Show resolved Hide resolved
@github-actions github-actions bot removed the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Jun 19, 2023
@Vge0rge Vge0rge requested review from melwee01 and mia-ko June 19, 2023 11:36
include/identity_key.h Outdated Show resolved Hide resolved
include/hw_unique_key.h Outdated Show resolved Hide resolved
include/hw_unique_key.h Outdated Show resolved Hide resolved
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
@Vge0rge Vge0rge force-pushed the improve_identity_hw_key branch 2 times, most recently from cc934e9 to 25be3db Compare June 20, 2023 11:28
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
include/hw_unique_key.h Show resolved Hide resolved
include/identity_key.h Show resolved Hide resolved
include/identity_key.h Outdated Show resolved Hide resolved
@Vge0rge
Copy link
Contributor Author

Vge0rge commented Jun 20, 2023

@mia-ko I did some small changes in the changelog, could you check them please?

Copy link
Contributor

@lemrey lemrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your patience

doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
doc/nrf/releases/release-notes-changelog.rst Outdated Show resolved Hide resolved
The identity key library until now panicked with k_panic
in case of error in most of the cases. It is a preferred
practice to return error codes and let the application
decide what to do with the error. This updates the functions
from void to int and adds some extra error codes to cover
all the cases.

Ref: NCSDK-21839

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
The functionality of this sample is presented in other
samples (see hw_unique_key) making it redundant.

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
The hardware unique key library until now panicked with k_panic
in case of error in most of the cases. It is a preferred
practice to return error codes and let the application
decide what to do with the error. This updates the functions
from void to int and adds some extra error codes to cover
all the cases.

Ref: NCSDK-21839

Signed-off-by: Georgios Vasilakis <georgios.vasilakis@nordicsemi.no>
@nordicjm nordicjm merged commit 7fafbfb into nrfconnect:main Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants