Skip to content

Commit 1ae13bc

Browse files
don't reset db on security manager reset as the docs require
1 parent bcca759 commit 1ae13bc

File tree

5 files changed

+0
-28
lines changed

5 files changed

+0
-28
lines changed

features/FEATURE_BLE/ble/generic/FileSecurityDb.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ class FileSecurityDb : public SecurityDb {
126126

127127
virtual void set_restore(bool reload);
128128

129-
virtual void reset();
130-
131129
private:
132130
virtual uint8_t get_entry_count();
133131

features/FEATURE_BLE/ble/generic/MemorySecurityDb.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,6 @@ class MemorySecurityDb : public SecurityDb {
148148
}
149149
}
150150

151-
152-
/* saving and loading from nvm */
153-
154-
virtual void reset() {
155-
SecurityDb::reset();
156-
for (size_t i = 0; i < MAX_ENTRIES; ++i) {
157-
_entries[i] = entry_t();
158-
}
159-
}
160-
161151
private:
162152
virtual uint8_t get_entry_count() {
163153
return MAX_ENTRIES;

features/FEATURE_BLE/ble/generic/SecurityDb.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,6 @@ class SecurityDb {
656656
*/
657657
virtual void set_restore(bool reload) { };
658658

659-
/**
660-
* Reset the databse by removing all information
661-
*/
662-
virtual void reset() {
663-
_local_identity = SecurityEntryIdentity_t();
664-
_local_csrk = csrk_t();
665-
_local_sign_counter = 0;
666-
}
667-
668659
private:
669660
/**
670661
* Get an entry for a new connection not present in the db yet. This will find a free entry

features/FEATURE_BLE/source/generic/FileSecurityDb.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,6 @@ void FileSecurityDb::set_restore(bool reload) {
304304
db_write(&reload, DB_OFFSET_RESTORE);
305305
}
306306

307-
void FileSecurityDb::reset() {
308-
SecurityDb::reset();
309-
erase_db_file(_db_file);
310-
}
311-
312307
/* helper functions */
313308

314309
uint8_t FileSecurityDb::get_entry_count() {

features/FEATURE_BLE/source/generic/GenericSecurityManager.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ ble_error_t GenericSecurityManager::init(
116116
}
117117

118118
ble_error_t GenericSecurityManager::reset(void) {
119-
MBED_ASSERT(_db);
120119
_pal.reset();
121-
_db->reset();
122120
SecurityManager::reset();
123121

124122
return BLE_ERROR_NONE;

0 commit comments

Comments
 (0)