Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit daa3454c authored by Himanshu Rawat's avatar Himanshu Rawat
Browse files

Set LE link as authenticated if encrypted with authenticated LTK

On encryption after reconnection, the link was not designated as authenticated even if the LTK was authenticated. In such case, SMP security request from the remote deivce with MTIM protection requirement triggers the re-pairing attempt from the stack.

Change-Id: Idf65f9d18302fa15235d83c93d4d345a11f90293
Test: Reconnect with LE devices
Test: m
Bug: 290799434
parent b8bbc7e9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3397,7 +3397,10 @@ void btm_sec_encrypt_change(uint16_t handle, tHCI_STATUS status,
          p_dev_rec->sec_flags |= BTM_SEC_16_DIGIT_PIN_AUTHED;
        }
      } else if (p_dev_rec->ble_hci_handle == handle) {  // BLE
        p_dev_rec->sec_flags |= BTM_SEC_LE_ENCRYPTED;
        p_dev_rec->set_le_device_encrypted();
        if (p_dev_rec->is_le_link_key_authenticated()) {
            p_dev_rec->set_le_device_authenticated();
        }
      } else {
        LOG_ERROR(
            "Received encryption change for unknown device handle:0x%04x "