mirror of https://github.com/ARMmbed/mbed-os.git
reinitialise identity and signing when bond table reset
parent
110b190b38
commit
9d54c56562
|
@ -167,7 +167,21 @@ template<template<class> class TPalSecurityManager, template<class> class Signin
|
||||||
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::purgeAllBondingState_(void) {
|
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::purgeAllBondingState_(void) {
|
||||||
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
|
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
|
||||||
_db->clear_entries();
|
_db->clear_entries();
|
||||||
return BLE_ERROR_NONE;
|
|
||||||
|
ble_error_t ret = BLE_ERROR_NONE;
|
||||||
|
|
||||||
|
#if BLE_FEATURE_SIGNING
|
||||||
|
// generate new csrk and irk
|
||||||
|
ret = init_signing();
|
||||||
|
if (ret) {
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
#endif // BLE_FEATURE_SIGNING
|
||||||
|
#if BLE_FEATURE_PRIVACY
|
||||||
|
ret = init_identity();
|
||||||
|
#endif // BLE_FEATURE_PRIVACY
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<template<class> class TPalSecurityManager, template<class> class SigningMonitor>
|
template<template<class> class TPalSecurityManager, template<class> class SigningMonitor>
|
||||||
|
|
Loading…
Reference in New Issue