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

Commit 8b110ea0 authored by Qasim Javed's avatar Qasim Javed
Browse files

Revert "SMP: Calculate LTK on BR SMP begin"

Bug: 232409640
Tag: #refactor
Test: gd/cert/run

This reverts commit c73e0297.

Reason for revert: Reverting this fixes b/232409640 where we are sending
signing information to the carkit twice

Change-Id: I296d0fe642d91088ea90dbda24e82f9044ad5ba0
parent ac30ec7b
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -902,15 +902,6 @@ void smp_br_check_authorization_request(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
  }
  SMP_TRACE_DEBUG("%s: use h7 = %d", __func__, p_cb->key_derivation_h7_used);

  /* SMP over BR/EDR should always be used with CTKD, so derive LTK from
   * LK before receiving keys */
  if ((p_cb->role == HCI_ROLE_CENTRAL &&
       (p_cb->local_i_key & SMP_SEC_KEY_TYPE_ENC)) ||
      (p_cb->role == HCI_ROLE_PERIPHERAL &&
       (p_cb->local_r_key & SMP_SEC_KEY_TYPE_ENC))) {
    smp_generate_ltk(p_cb, p_data);
  }

  SMP_TRACE_DEBUG(
      "%s rcvs upgrades: i_keys=0x%x r_keys=0x%x (i-initiator r-responder)",
      __func__, p_cb->local_i_key, p_cb->local_r_key);
+1 −1
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ static void smp_generate_ltk_cont(uint16_t div, tSMP_CB* p_cb) {
void smp_generate_ltk(tSMP_CB* p_cb, UNUSED_ATTR tSMP_INT_DATA* p_data) {
  SMP_TRACE_DEBUG("%s", __func__);

  if (p_cb->smp_over_br) {
  if (smp_get_br_state() == SMP_BR_STATE_BOND_PENDING) {
    smp_br_process_link_key(p_cb, NULL);
    return;
  } else if (p_cb->le_secure_connections_mode_is_used) {