-
Notifications
You must be signed in to change notification settings - Fork 3k
BLE: Add KVStore Security DB #13038
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
BLE: Add KVStore Security DB #13038
Conversation
5ddb77a
to
b503540
Compare
@paul-szczepanek-arm, thank you for your changes. |
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. Thanks for adding the changes related to the local identity and adding connection address to the whitelist.
sign_count_t sign_counter | ||
) { | ||
this->SecurityDb::set_local_sign_counter(sign_counter); | ||
db_write(&_local_sign_counter, DB_OFFSET_LOCAL_SIGN_COUNT); |
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.
We talked about it, is it something we want to do everytime the sign counter change ?
I would also either override it in the KVStore implementation and just call the parent method or leave a note here explaining why it isn't overridden (too many writes...)
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.
that is fixed on the other branch, I'll rebase this
6a80025
to
c2c09c7
Compare
had to force push to rebase |
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.
Can you extend commit 67ee6f6 with better commit message?
e91db54
to
cc92a46
Compare
I have broken up the commit into smaller pieces and expanded the comments. |
This PR cannot be merged due to conflicts. Please rebase to resolve them. |
This works similar to filesystem db but uses the KVStore which it assumes is initialised. This is checked by open_db. On initialisation it either reads the present db or writes a new db into all entries thus guaranteeing that after the initialisation we will not run out of space for the keys and no extra error handling is needed.
The selection is now based on the lib json (which allows you to disable filesystem db or kvstore db) and the call to SecurityManager::init. It will always fall back on memory db if no other db is available.
@0xc0170 are you happy with this now ? |
is CI stuck on this? still showing as expecting for me |
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
@paul-szczepanek-arm Just noticed, can you fix these:
Some of these are new files in this PR. Add SDPX and we will restart CI asap |
CI started |
Test run: SUCCESSSummary: 6 of 6 test jobs passed |
Travis restarted to get status update |
Just a check - no docs change for this feature change? |
The handbook doesn't mention individual database implementations. They are only documented in the config file and headers. Maybe that's something we should improve but this addition doesn't make the current docs out of date. |
Summary of changes
This adds a new Security DB type for BLE Security Manager. This is optional and disabled by default. The presence of filesystem and kvstore DBs is now set in the mbed_lib.json file with the default values retaining the current setup.
Requires preceding PR: #13037
(so ignore the first commit)
Impact of changes
Migration actions required
Documentation
none
Pull request type
Test results
Reviewers
@pan-