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

Commit 06e088e1 authored by Bhakthavatsala Raghavendra's avatar Bhakthavatsala Raghavendra Committed by Automerger Merge Worker
Browse files

Save peer CSRK after ltk generation am: 0c8b6fda

parents 8648cd94 0c8b6fda
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1083,6 +1083,10 @@ void smp_proc_srk_info(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {

  smp_update_key_mask(p_cb, SMP_SEC_KEY_TYPE_CSRK, true);

  if (com::android::bluetooth::flags::save_peer_csrk_after_ltk_gen()) {
    smp_key_distribution_by_transport(p_cb, NULL);
  }

  /* save CSRK to security record */
  tBTM_LE_KEY_VALUE le_key = {
          .pcsrk_key =
@@ -1100,8 +1104,11 @@ void smp_proc_srk_info(tSMP_CB* p_cb, tSMP_INT_DATA* p_data) {
  if ((p_cb->peer_auth_req & SMP_AUTH_BOND) && (p_cb->loc_auth_req & SMP_AUTH_BOND)) {
    btm_sec_save_le_key(p_cb->pairing_bda, BTM_LE_KEY_PCSRK, &le_key, true);
  }

  if (!com::android::bluetooth::flags::save_peer_csrk_after_ltk_gen()) {
    smp_key_distribution_by_transport(p_cb, NULL);
  }
}

/*******************************************************************************
 * Function     smp_proc_compare