mirror of https://github.com/ARMmbed/mbed-os.git
don't reset db on security manager reset as the docs require
parent
bcca75973e
commit
1ae13bc80f
|
@ -126,8 +126,6 @@ public:
|
||||||
|
|
||||||
virtual void set_restore(bool reload);
|
virtual void set_restore(bool reload);
|
||||||
|
|
||||||
virtual void reset();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual uint8_t get_entry_count();
|
virtual uint8_t get_entry_count();
|
||||||
|
|
||||||
|
|
|
@ -148,16 +148,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* saving and loading from nvm */
|
|
||||||
|
|
||||||
virtual void reset() {
|
|
||||||
SecurityDb::reset();
|
|
||||||
for (size_t i = 0; i < MAX_ENTRIES; ++i) {
|
|
||||||
_entries[i] = entry_t();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual uint8_t get_entry_count() {
|
virtual uint8_t get_entry_count() {
|
||||||
return MAX_ENTRIES;
|
return MAX_ENTRIES;
|
||||||
|
|
|
@ -656,15 +656,6 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void set_restore(bool reload) { };
|
virtual void set_restore(bool reload) { };
|
||||||
|
|
||||||
/**
|
|
||||||
* Reset the databse by removing all information
|
|
||||||
*/
|
|
||||||
virtual void reset() {
|
|
||||||
_local_identity = SecurityEntryIdentity_t();
|
|
||||||
_local_csrk = csrk_t();
|
|
||||||
_local_sign_counter = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* Get an entry for a new connection not present in the db yet. This will find a free entry
|
* Get an entry for a new connection not present in the db yet. This will find a free entry
|
||||||
|
|
|
@ -304,11 +304,6 @@ void FileSecurityDb::set_restore(bool reload) {
|
||||||
db_write(&reload, DB_OFFSET_RESTORE);
|
db_write(&reload, DB_OFFSET_RESTORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSecurityDb::reset() {
|
|
||||||
SecurityDb::reset();
|
|
||||||
erase_db_file(_db_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* helper functions */
|
/* helper functions */
|
||||||
|
|
||||||
uint8_t FileSecurityDb::get_entry_count() {
|
uint8_t FileSecurityDb::get_entry_count() {
|
||||||
|
|
|
@ -116,9 +116,7 @@ ble_error_t GenericSecurityManager::init(
|
||||||
}
|
}
|
||||||
|
|
||||||
ble_error_t GenericSecurityManager::reset(void) {
|
ble_error_t GenericSecurityManager::reset(void) {
|
||||||
MBED_ASSERT(_db);
|
|
||||||
_pal.reset();
|
_pal.reset();
|
||||||
_db->reset();
|
|
||||||
SecurityManager::reset();
|
SecurityManager::reset();
|
||||||
|
|
||||||
return BLE_ERROR_NONE;
|
return BLE_ERROR_NONE;
|
||||||
|
|
Loading…
Reference in New Issue