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

Commit 75ef8f3c authored by Brian Delwiche's avatar Brian Delwiche Committed by Automerger Merge Worker
Browse files

Merge changes from topic "314331379-fix-tm-dev" into tm-dev am: d477f5ed am: fcf18370

parents cd8a3136 fcf18370
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -918,6 +918,20 @@ static void read_encryption_key_size_complete_after_encryption_change(uint8_t st
    return;
  }

  if (btm_sec_is_session_key_size_downgrade(handle, key_size)) {
    LOG_ERROR(
        "encryption key size lower than cached value, disconnecting. "
        "handle: 0x%x attempted key size: %d",
        handle, key_size);
    acl_disconnect_from_handle(
        handle, HCI_ERR_HOST_REJECT_SECURITY,
        "stack::btu::btu_hcif::read_encryption_key_size_complete_after_"
        "encryption_change Key Size Downgrade");
    return;
  }

  btm_sec_update_session_key_size(handle, key_size);

  // good key size - succeed
  btm_acl_encrypt_change(handle, static_cast<tHCI_STATUS>(status),
                         1 /* enable */);