Loading system/stack/btm/btm_sec.cc +5 −0 Original line number Diff line number Diff line Loading @@ -3226,6 +3226,11 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status, uint8_t encr_en if (transport == BT_TRANSPORT_LE) { key_size = p_dev_rec->sec_rec.ble_keys.key_size; if (key_size == 0 && status == HCI_SUCCESS && encr_enable == HCI_ENCRYPT_MODE_ON) { /* Only case when key size is 0 during successfull encryption is pairing - for this case look * up the key size */ key_size = SMP_GetPendingPairingKeySize(); } } log::debug( Loading system/stack/include/smp_api.h +9 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,15 @@ void SMP_ClearLocScOobData(); ******************************************************************************/ void SMP_SirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res); /******************************************************************************* * * Function SMP_SirkConfirmDeviceReply * * Description Returns the key size of peinding LE pairing * ******************************************************************************/ uint16_t SMP_GetPendingPairingKeySize(); // Called when LTK request is received from controller. bool smp_proc_ltk_request(const RawAddress& bda); Loading system/stack/smp/smp_api.cc +5 −0 Original line number Diff line number Diff line Loading @@ -525,3 +525,8 @@ void SMP_SirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res) { smp_sm_event(p_cb, SMP_SIRK_DEVICE_VALID_EVT, &smp_int_data); } } uint16_t SMP_GetPendingPairingKeySize() { tSMP_CB* p_cb = &smp_cb; return p_cb->loc_enc_size; } No newline at end of file system/test/mock/mock_stack_smp_api.cc +5 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,8 @@ void SMP_ClearLocScOobData() { inc_func_call_count(__func__); } void SMP_SirkConfirmDeviceReply(const RawAddress& /* bd_addr */, uint8_t /* res */) { inc_func_call_count(__func__); } uint16_t SMP_GetPendingPairingKeySize() { inc_func_call_count(__func__); return 0; } No newline at end of file Loading
system/stack/btm/btm_sec.cc +5 −0 Original line number Diff line number Diff line Loading @@ -3226,6 +3226,11 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status, uint8_t encr_en if (transport == BT_TRANSPORT_LE) { key_size = p_dev_rec->sec_rec.ble_keys.key_size; if (key_size == 0 && status == HCI_SUCCESS && encr_enable == HCI_ENCRYPT_MODE_ON) { /* Only case when key size is 0 during successfull encryption is pairing - for this case look * up the key size */ key_size = SMP_GetPendingPairingKeySize(); } } log::debug( Loading
system/stack/include/smp_api.h +9 −0 Original line number Diff line number Diff line Loading @@ -200,6 +200,15 @@ void SMP_ClearLocScOobData(); ******************************************************************************/ void SMP_SirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res); /******************************************************************************* * * Function SMP_SirkConfirmDeviceReply * * Description Returns the key size of peinding LE pairing * ******************************************************************************/ uint16_t SMP_GetPendingPairingKeySize(); // Called when LTK request is received from controller. bool smp_proc_ltk_request(const RawAddress& bda); Loading
system/stack/smp/smp_api.cc +5 −0 Original line number Diff line number Diff line Loading @@ -525,3 +525,8 @@ void SMP_SirkConfirmDeviceReply(const RawAddress& bd_addr, uint8_t res) { smp_sm_event(p_cb, SMP_SIRK_DEVICE_VALID_EVT, &smp_int_data); } } uint16_t SMP_GetPendingPairingKeySize() { tSMP_CB* p_cb = &smp_cb; return p_cb->loc_enc_size; } No newline at end of file
system/test/mock/mock_stack_smp_api.cc +5 −0 Original line number Diff line number Diff line Loading @@ -69,3 +69,8 @@ void SMP_ClearLocScOobData() { inc_func_call_count(__func__); } void SMP_SirkConfirmDeviceReply(const RawAddress& /* bd_addr */, uint8_t /* res */) { inc_func_call_count(__func__); } uint16_t SMP_GetPendingPairingKeySize() { inc_func_call_count(__func__); return 0; } No newline at end of file