mirror of https://github.com/ARMmbed/mbed-os.git
ltk for secure connections
parent
3236eada5e
commit
1446142b60
|
@ -387,6 +387,11 @@ public:
|
|||
// Keys
|
||||
//
|
||||
|
||||
virtual void on_secure_connections_ltk_generated(
|
||||
connection_handle_t connection,
|
||||
const ltk_t *ltk
|
||||
);
|
||||
|
||||
virtual void on_keys_distributed(
|
||||
connection_handle_t connection,
|
||||
advertising_peer_address_type_t peer_address_type,
|
||||
|
|
|
@ -366,6 +366,18 @@ public:
|
|||
// Keys
|
||||
//
|
||||
|
||||
/**
|
||||
* Store the results of key generation of the stage 2 of secure connections pairing
|
||||
* @see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part H - 2.3.5.6.5
|
||||
*
|
||||
* @param[in] connection connection handle
|
||||
* @param[in] ltk long term key from the peer
|
||||
*/
|
||||
virtual void on_secure_connections_ltk_generated(
|
||||
connection_handle_t connection,
|
||||
const ltk_t *ltk
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Store the results of key distribution after all the keys have been received.
|
||||
*
|
||||
|
|
|
@ -801,6 +801,21 @@ void GenericSecurityManager::on_oob_request(connection_handle_t connection) {
|
|||
// Keys
|
||||
//
|
||||
|
||||
void GenericSecurityManager::on_secure_connections_ltk_generated(
|
||||
connection_handle_t connection,
|
||||
const ltk_t *ltk
|
||||
) {
|
||||
SecurityEntry_t *entry = _db.get_entry(connection);
|
||||
if (!entry) {
|
||||
return;
|
||||
}
|
||||
|
||||
entry->mitm_ltk = entry->mitm_performed;
|
||||
entry->secure_connections = true;
|
||||
|
||||
_db.set_entry_peer_ltk(connection, ltk);
|
||||
}
|
||||
|
||||
void GenericSecurityManager::on_keys_distributed(
|
||||
connection_handle_t connection,
|
||||
advertising_peer_address_type_t peer_address_type,
|
||||
|
|
Loading…
Reference in New Issue