Skip to content

Commit ad09ba0

Browse files
author
Donatien Garnier
committed
Fix handling of security escalation in on_connection_complete()
1 parent 3f7a7a4 commit ad09ba0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

features/FEATURE_BLE/source/generic/GenericGap.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,11 +1235,12 @@ void GenericGap::on_connection_complete(const pal::GapConnectionCompleteEvent& e
12351235
// Now starts pairing or authentication procedures if required
12361236
if(needs_pairing) {
12371237
SecurityManager &sm = createBLEInstance()->getSecurityManager();
1238-
sm.requestPairing(e.connection_handle);
1238+
// Request authentication to start pairing procedure
1239+
sm.requestAuthentication(e.connection_handle);
12391240
}
12401241
else if(needs_authentication) {
1241-
SecurityManager &sm = createBLEInstance()->getSecurityManager();
1242-
sm.requestAuthentication(e.connection_handle);
1242+
// TODO: GAP Authentication != Security Manager authentication
1243+
// Needs to be implemented
12431244
}
12441245
} else {
12451246
// for now notify user that the connection failled by issuing a timeout

0 commit comments

Comments
 (0)