mirror of https://github.com/ARMmbed/mbed-os.git
doxygen
parent
132b9e01bf
commit
f53359f60c
|
@ -334,10 +334,10 @@ public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If implementation has enough memory it can return the
|
* If implementation has enough memory it can return the
|
||||||
* irk list synchronously, otherwise asynchronously iteration
|
* irk list synchronously, otherwise asynchronous iteration
|
||||||
* shall be used through get_next_entry_peer_identity
|
* shall be used through get_next_entry_peer_identity
|
||||||
*
|
*
|
||||||
* @param[in] list the list of entires, NULL if empty
|
* @param[in] list the list of entries, NULL if empty
|
||||||
*
|
*
|
||||||
* @return BLE_ERROR_NONE if the function is implemented.
|
* @return BLE_ERROR_NONE if the function is implemented.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -428,8 +428,25 @@ public:
|
||||||
const rand_t *rand
|
const rand_t *rand
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inform the security manager that a device has been disconnected and its
|
||||||
|
* entry can be put in NVM storage. Called by GAP.
|
||||||
|
*
|
||||||
|
* @param[in] connectionHandle Handle to identify the connection.
|
||||||
|
* @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
|
||||||
|
*/
|
||||||
virtual void on_disconnected(connection_handle_t connection);
|
virtual void on_disconnected(connection_handle_t connection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inform the Security manager of a new connection. This will create
|
||||||
|
* or retrieve an existing security manager entry for the connected device.
|
||||||
|
* Called by GAP.
|
||||||
|
*
|
||||||
|
* @param[in] connectionHandle Handle to identify the connection.
|
||||||
|
* @param peer_address Address of the connected device.
|
||||||
|
* @param is_master True if device is the master.
|
||||||
|
* @return BLE_ERROR_NONE or appropriate error code indicating the failure reason.
|
||||||
|
*/
|
||||||
virtual void on_connected(connection_handle_t connection, address_t peer_address, bool is_master);
|
virtual void on_connected(connection_handle_t connection, address_t peer_address, bool is_master);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -554,13 +554,12 @@ bool GenericSecurityManager::check_against_identity_address(
|
||||||
|
|
||||||
/* prand_hash now contains the hash result in the first 3 octects
|
/* prand_hash now contains the hash result in the first 3 octects
|
||||||
* compare it with the hash in the peer identity address */
|
* compare it with the hash in the peer identity address */
|
||||||
|
|
||||||
/* can't use memcmp because of address_t constness */
|
|
||||||
if ((prand_hash[0] == peer_address[3])
|
if ((prand_hash[0] == peer_address[3])
|
||||||
|| (prand_hash[1] == peer_address[4])
|
|| (prand_hash[1] == peer_address[4])
|
||||||
|| (prand_hash[2] == peer_address[5])) {
|
|| (prand_hash[2] == peer_address[5])) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue