reinitialise identity and signing when bond table reset

pull/13037/head
Paul Szczeanek 2020-06-03 17:36:06 +01:00
parent 110b190b38
commit 9d54c56562
1 changed files with 15 additions and 1 deletions

View File

@ -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>