mirror of https://github.com/ARMmbed/mbed-os.git
Cordio PAL Security Manager: Copy locally own IRK.
The IRK needs to be stored somewhere as it is not copied inside the stack, the stack just keeps a reference to it.pull/6932/head
parent
2924bb4c86
commit
e4813f4fe9
|
@ -326,6 +326,7 @@ private:
|
|||
passkey_num_t _default_passkey;
|
||||
bool _lesc_keys_generated;
|
||||
uint8_t _public_key_x[SEC_ECC_KEY_LEN];
|
||||
irk_t _irk;
|
||||
};
|
||||
|
||||
} // cordio
|
||||
|
|
|
@ -264,7 +264,8 @@ ble_error_t CordioSecurityManager::set_ltk_not_found(
|
|||
|
||||
ble_error_t CordioSecurityManager::set_irk(const irk_t& irk)
|
||||
{
|
||||
DmSecSetLocalIrk(const_cast<uint8_t*>(irk.data()));
|
||||
_irk = irk;
|
||||
DmSecSetLocalIrk(_irk.data());
|
||||
return BLE_ERROR_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue