-
Notifications
You must be signed in to change notification settings - Fork 7.7k
bluetooth: mesh: removing gotten stuck persisted psa key if key id is reused #92780
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
Conversation
93b03a2
to
370207c
Compare
tests/bsim/bluetooth/mesh/tests_scripts/persistence/provisioning.sh
Outdated
Show resolved
Hide resolved
tests/bsim/bluetooth/mesh/tests_scripts/persistence/provisioning.sh
Outdated
Show resolved
Hide resolved
370207c
to
1863abd
Compare
tests/bsim/bluetooth/mesh/tests_scripts/persistence/provisioning.sh
Outdated
Show resolved
Hide resolved
tests/bsim/bluetooth/mesh/tests_scripts/persistence/provisioning.sh
Outdated
Show resolved
Hide resolved
Commit adds destruction of the persisted in PSA ITS key if mesh does not own it (zero bit in the bitmap of persisted keys). This is not standard mesh behavior, but might happen if something happens between removing key data in mesh and in the crypto library (for example power off in bettwen). Previously, mesh wasn't able to import key with gotten stuck key id. The current fix reproduces more robust behavior. Signed-off-by: Aleksandr Khromykh <[email protected]>
1863abd
to
c6ba81d
Compare
Commit extends existing persistent provisioning bsim mesh test that checks that mesh removes gotten stuck persisted key if key is reused. Correct key is imported normally after that. Signed-off-by: Aleksandr Khromykh <[email protected]>
c6ba81d
to
fb417d1
Compare
|
# Test must be added in pair and in sequence. | ||
# First test: saves data; second test: verifies it. | ||
# | ||
# Test procedure: |
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 is also bit new that we are now documenting the test procedure within the ".sh" file. This is not bad, but perhaps we should do this all tests eventually whenever we touch them.
PR adds destruction of the persisted in PSA ITS key if mesh does not own it (zero bit in the bitmap of persisted keys).
This is not standard mesh behavior, but might happen if something happens between removing key data in mesh and in the crypto library (for example, power off in between).
Previously, mesh wasn't able to import key with gotten stuck key ID. The current fix reproduces more robust behavior.
Additionally, PR extends the existing mesh persistent provisioning bsim test to emulate gotten stuck key and checking this key was destroyed, and correct one was imported instead.