Loading system/stack/btm/btm_dev.cc +18 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,12 @@ constexpr char kBtmLogTag[] = "BOND"; } static void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->link_key.fill(0); memset(&p_dev_rec->ble_keys, 0, sizeof(tBTM_SEC_BLE_KEYS)); list_remove(btm_sec_cb.sec_dev_rec, p_dev_rec); } /******************************************************************************* * * Function BTM_SecAddDevice Loading Loading @@ -142,12 +148,6 @@ bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, return true; } void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->link_key.fill(0); memset(&p_dev_rec->ble_keys, 0, sizeof(tBTM_SEC_BLE_KEYS)); list_remove(btm_sec_cb.sec_dev_rec, p_dev_rec); } /** Removes the device from acceptlist */ void BTM_AcceptlistRemove(const RawAddress& address); Loading Loading @@ -791,3 +791,15 @@ bool BTM_IsRemoteNameKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); return (p_dev_rec == nullptr) ? false : p_dev_rec->is_name_known(); } namespace bluetooth { namespace testing { namespace legacy { void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { ::wipe_secrets_and_remove(p_dev_rec); } } // namespace legacy } // namespace testing } // namespace bluetooth system/stack/btm/btm_dev.h +0 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,6 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec); /** Free resources associated with the device associated with |bd_addr| address. * * *** WARNING *** Loading system/stack/test/btm/stack_btm_sec_test.cc +12 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,18 @@ using testing::Return; using testing::Test; namespace bluetooth { namespace testing { namespace legacy { void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec); } // namespace legacy } // namespace testing } // namespace bluetooth using bluetooth::testing::legacy::wipe_secrets_and_remove; constexpr size_t kBtmSecMaxDeviceRecords = static_cast<size_t>(BTM_SEC_MAX_DEVICE_RECORDS + 1); Loading system/test/mock/mock_stack_btm_dev.cc +0 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,6 @@ void BTM_SecClearSecurityFlags(const RawAddress& /* bd_addr */) { void btm_consolidate_dev(tBTM_SEC_DEV_REC* /* p_target_rec */) { inc_func_call_count(__func__); } void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* /* p_dev_rec */) { inc_func_call_count(__func__); } void btm_dev_consolidate_existing_connections(const RawAddress& /* bd_addr */) { inc_func_call_count(__func__); } Loading Loading
system/stack/btm/btm_dev.cc +18 −6 Original line number Diff line number Diff line Loading @@ -55,6 +55,12 @@ constexpr char kBtmLogTag[] = "BOND"; } static void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->link_key.fill(0); memset(&p_dev_rec->ble_keys, 0, sizeof(tBTM_SEC_BLE_KEYS)); list_remove(btm_sec_cb.sec_dev_rec, p_dev_rec); } /******************************************************************************* * * Function BTM_SecAddDevice Loading Loading @@ -142,12 +148,6 @@ bool BTM_SecAddDevice(const RawAddress& bd_addr, DEV_CLASS dev_class, return true; } void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { p_dev_rec->link_key.fill(0); memset(&p_dev_rec->ble_keys, 0, sizeof(tBTM_SEC_BLE_KEYS)); list_remove(btm_sec_cb.sec_dev_rec, p_dev_rec); } /** Removes the device from acceptlist */ void BTM_AcceptlistRemove(const RawAddress& address); Loading Loading @@ -791,3 +791,15 @@ bool BTM_IsRemoteNameKnown(const RawAddress& bd_addr, tBT_TRANSPORT transport) { tBTM_SEC_DEV_REC* p_dev_rec = btm_find_dev(bd_addr); return (p_dev_rec == nullptr) ? false : p_dev_rec->is_name_known(); } namespace bluetooth { namespace testing { namespace legacy { void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec) { ::wipe_secrets_and_remove(p_dev_rec); } } // namespace legacy } // namespace testing } // namespace bluetooth
system/stack/btm/btm_dev.h +0 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,6 @@ #include "types/ble_address_with_type.h" #include "types/raw_address.h" void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec); /** Free resources associated with the device associated with |bd_addr| address. * * *** WARNING *** Loading
system/stack/test/btm/stack_btm_sec_test.cc +12 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,18 @@ using testing::Return; using testing::Test; namespace bluetooth { namespace testing { namespace legacy { void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* p_dev_rec); } // namespace legacy } // namespace testing } // namespace bluetooth using bluetooth::testing::legacy::wipe_secrets_and_remove; constexpr size_t kBtmSecMaxDeviceRecords = static_cast<size_t>(BTM_SEC_MAX_DEVICE_RECORDS + 1); Loading
system/test/mock/mock_stack_btm_dev.cc +0 −3 Original line number Diff line number Diff line Loading @@ -103,9 +103,6 @@ void BTM_SecClearSecurityFlags(const RawAddress& /* bd_addr */) { void btm_consolidate_dev(tBTM_SEC_DEV_REC* /* p_target_rec */) { inc_func_call_count(__func__); } void wipe_secrets_and_remove(tBTM_SEC_DEV_REC* /* p_dev_rec */) { inc_func_call_count(__func__); } void btm_dev_consolidate_existing_connections(const RawAddress& /* bd_addr */) { inc_func_call_count(__func__); } Loading