added slave security request

pull/6188/head
paul-szczepanek-arm 2018-01-22 11:49:42 +00:00
parent 3300395468
commit d1c29faaa8
2 changed files with 18 additions and 1 deletions

View File

@ -284,6 +284,11 @@ public:
*/
virtual void on_valid_mic_timeout(connection_handle_t connection) = 0;
virtual void on_slave_security_request(
connection_handle_t connection,
AuthenticationMask authentication
) = 0;
////////////////////////////////////////////////////////////////////////////
// Encryption
//
@ -503,6 +508,11 @@ public:
uint8_t max_encryption_key_size
) = 0;
virtual ble_error_t slave_security_request(
connection_handle_t connection,
AuthenticationMask authentication
) = 0;
////////////////////////////////////////////////////////////////////////////
// Encryption
//

View File

@ -590,7 +590,7 @@ public:
if (entry->authenticated) {
return BLE_ERROR_NONE;
} else {
entry->encryption_requested;
entry->encryption_requested = true;
return enable_encryption(connection);
}
} else {
@ -750,6 +750,13 @@ public:
_app_event_handler->validMicTimeout(connection);
}
virtual void on_slave_security_request(
connection_handle_t connection,
AuthenticationMask authentication
) {
}
////////////////////////////////////////////////////////////////////////////
// Encryption
//