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

Commit a37d87b9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes I4d144b35,I7d0646d5 am: eb9c1dd9 am: 640e7851

parents d425905d 640e7851
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -206,8 +206,9 @@
    "GAP/MOD/NCON/BV-01-C",
    "GAP/MOD/NDIS/BV-01-C",
    "GAP/SEC/AUT/BV-11-C",
    "GAP/SEC/AUT/BV-23-C",
    "GAP/SEC/AUT/BV-12-C",
    "GAP/SEC/AUT/BV-13-C",
    "GAP/SEC/AUT/BV-23-C",
    "GAP/SEC/SEM/BV-10-C",
    "GAP/SEC/SEM/BV-04-C",
    "GATT/CL/GAC/BV-01-C",
@@ -757,7 +758,6 @@
    "GAP/DM/NCON/BV-01-C",
    "GAP/IDLE/NAMP/BV-01-C",
    "GAP/SEC/AUT/BV-02-C",
    "GAP/SEC/AUT/BV-13-C",
    "GAP/SEC/AUT/BV-14-C",
    "GAP/SEC/AUT/BV-17-C",
    "GAP/SEC/AUT/BV-18-C",
+0 −10
Original line number Diff line number Diff line
@@ -1978,16 +1978,6 @@ impl IBluetooth for Bluetooth {
            return false;
        }

        let is_bonding = match self.found_devices.get(&device.address) {
            Some(d) => d.bond_state == BtBondState::Bonding,
            None => false,
        };

        if !is_bonding {
            warn!("Can't set pairing confirmation. Device {} isn't bonding.", device.address);
            return false;
        }

        self.intf.lock().unwrap().ssp_reply(
            &addr.unwrap(),
            BtSspVariant::PasskeyConfirmation,
+1 −2
Original line number Diff line number Diff line
@@ -3376,8 +3376,7 @@ 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_AUTHENTICATED | BTM_SEC_LE_ENCRYPTED);
        p_dev_rec->sec_flags |= BTM_SEC_LE_ENCRYPTED;
      } else {
        LOG_ERROR(
            "Received encryption change for unknown device handle:0x%04x "
+2 −4
Original line number Diff line number Diff line
@@ -309,13 +309,11 @@ TEST_F(StackBtmWithInitFreeTest, btm_sec_encrypt_change) {

  // With le device encryption enable
  btm_sec_encrypt_change(ble_handle, HCI_SUCCESS, 0x01);
  ASSERT_EQ(BTM_SEC_IN_USE | BTM_SEC_LE_AUTHENTICATED | BTM_SEC_LE_ENCRYPTED,
            device_record->sec_flags);
  ASSERT_EQ(BTM_SEC_IN_USE | BTM_SEC_LE_ENCRYPTED, device_record->sec_flags);

  // With le device encryption disable
  btm_sec_encrypt_change(ble_handle, HCI_SUCCESS, 0x00);
  ASSERT_EQ(BTM_SEC_IN_USE | BTM_SEC_LE_AUTHENTICATED,
            device_record->sec_flags);
  ASSERT_EQ(BTM_SEC_IN_USE, device_record->sec_flags);
  device_record->sec_flags = BTM_SEC_IN_USE;

  wipe_secrets_and_remove(device_record);