-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix nordic security cancellation #7210
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
Return the derived type instead of the abstract one. This is legal as C++ supports covariant returns.
Depending on the role and the current state of the local device; pairing cancelation should be made with a call to a specific function. Normally the Nordic stack would reject invalid calls if the device is not in the correct state; therefore it was assumed that it was possible to detect the state from sd errors. Unfortunatelly this is not true with the latest softdevices as some calls succeed even if the device is not in the right state. To solve that issue cancelation looks at the current state of the device first to select the right function that will trigger the pairing cancellation. Note: the call to sd_ble_gap_authenticate was missing in the previous algorithm
Cancel pairing if the device fail to allocate the resources necessary for the pairing operation.
/morph build |
Build : SUCCESSBuild number : 2347 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1971 |
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.
the reject command returns an error during tests
Test : SUCCESSBuild number : 2132 |
@paul-szczepanek-arm Mind elaborating on which tests these are? |
I used clitest SM_persistent_db_test_01, but the checked in version has been modified to work around this problem |
@paul-szczepanek-arm Does that mean that this PR is good to go? If so, would you mind approving the PR? |
No, I mean the test has a work around since it's a pre-existing problem. This PR aims to fix it but doesn't. Yet. I used that test without the workaround to check. |
OH, ok. Thanks for the clarification. |
@paul-szczepanek-arm Would you mind posting the test results to help with tracking down the issue(s)? |
Making a note here that a fix is still incoming from @pan- before this can move forward. |
@cmonr I've pushed a fix and added a test https://github.com/ARMmbed/ble-tests/pull/44 . |
/morph build |
Build : SUCCESSBuild number : 2436 Triggering tests/morph test |
Test : SUCCESSBuild number : 2216 |
Exporter Build : SUCCESSBuild number : 2068 |
Description
This PR fix the way Bluetooth pairing is cancelled on Nordic targets. Depending on the state of the device, different calls must be issued to cancel Bluetooth pairing. One state (Bluetooth central) was not managed and a regression in the Nordic stack forced this patch.
Pull request type