invalid mic event

pull/6932/head
paul-szczepanek-arm 2018-03-29 13:46:26 +01:00
parent 5ae9cc3b53
commit 8d966dbe8c
3 changed files with 21 additions and 0 deletions

View File

@ -524,6 +524,12 @@ public:
connection_handle_t connection
);
/** @copydoc ble::pal::SecurityManager::on_invalid_mic
*/
virtual void on_invalid_mic(
connection_handle_t connection
);
/** @copydoc ble::pal::SecurityManager::on_slave_security_request
*/
virtual void on_slave_security_request(

View File

@ -280,6 +280,16 @@ public:
connection_handle_t connection
) = 0;
/**
* Indicate that the MIC verification has failed. This could
* be due to an invalid CSRK key.
*
* @param[in] connection connection handle
*/
virtual void on_invalid_mic(
connection_handle_t connection
) = 0;
/**
* Ask the stack to evaluate the security request received from the slave.
* This might result in the stack enabling encryption, or pairing/re-pairing.

View File

@ -945,6 +945,11 @@ void GenericSecurityManager::on_valid_mic_timeout(connection_handle_t connection
(void)connection;
}
void GenericSecurityManager::on_invalid_mic(connection_handle_t connection) {
(void)connection;
/* TODO: count and re-pair when threshold reached */
}
void GenericSecurityManager::on_slave_security_request(
connection_handle_t connection,
AuthenticationMask authentication