mirror of https://github.com/ARMmbed/mbed-os.git
Fix handling of security escalation in on_connection_complete()
parent
3f7a7a4213
commit
ad09ba0dcc
|
@ -1235,11 +1235,12 @@ void GenericGap::on_connection_complete(const pal::GapConnectionCompleteEvent& e
|
||||||
// Now starts pairing or authentication procedures if required
|
// Now starts pairing or authentication procedures if required
|
||||||
if(needs_pairing) {
|
if(needs_pairing) {
|
||||||
SecurityManager &sm = createBLEInstance()->getSecurityManager();
|
SecurityManager &sm = createBLEInstance()->getSecurityManager();
|
||||||
sm.requestPairing(e.connection_handle);
|
// Request authentication to start pairing procedure
|
||||||
|
sm.requestAuthentication(e.connection_handle);
|
||||||
}
|
}
|
||||||
else if(needs_authentication) {
|
else if(needs_authentication) {
|
||||||
SecurityManager &sm = createBLEInstance()->getSecurityManager();
|
// TODO: GAP Authentication != Security Manager authentication
|
||||||
sm.requestAuthentication(e.connection_handle);
|
// Needs to be implemented
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// for now notify user that the connection failled by issuing a timeout
|
// for now notify user that the connection failled by issuing a timeout
|
||||||
|
|
Loading…
Reference in New Issue