Skip to content

Commit 9d54c56

Browse files
reinitialise identity and signing when bond table reset
1 parent 110b190 commit 9d54c56

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

features/FEATURE_BLE/source/generic/GenericSecurityManager.tpp

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,21 @@ template<template<class> class TPalSecurityManager, template<class> class Signin
167167
ble_error_t GenericSecurityManager<TPalSecurityManager, SigningMonitor>::purgeAllBondingState_(void) {
168168
if (!_db) return BLE_ERROR_INITIALIZATION_INCOMPLETE;
169169
_db->clear_entries();
170-
return BLE_ERROR_NONE;
170+
171+
ble_error_t ret = BLE_ERROR_NONE;
172+
173+
#if BLE_FEATURE_SIGNING
174+
// generate new csrk and irk
175+
ret = init_signing();
176+
if (ret) {
177+
return ret;
178+
}
179+
#endif // BLE_FEATURE_SIGNING
180+
#if BLE_FEATURE_PRIVACY
181+
ret = init_identity();
182+
#endif // BLE_FEATURE_PRIVACY
183+
184+
return ret;
171185
}
172186

173187
template<template<class> class TPalSecurityManager, template<class> class SigningMonitor>

0 commit comments

Comments
 (0)