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

Commit 0cb8a49e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I8fd02d8f,Ia21eeb73

* changes:
  Remove unnecessary definition
  GD SecurityRecord: Explicitly set IsEncrypted to false upon loading
parents bfae013b 0beb762e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -129,6 +129,7 @@ void SecurityRecordStorage::LoadSecurityRecords(std::set<std::shared_ptr<record:
      byte_array = common::ByteArray<16>::FromString(*device.Le().GetSignatureKey());
      record->signature_key = std::make_optional<std::array<uint8_t, 16>>(byte_array->bytes);
    }
    record->SetIsEncrypted(false);
    record->SetIsEncryptionRequired(device.GetIsEncryptionRequired() == 1 ? true : false);
    record->SetAuthenticated(device.GetIsAuthenticated() == 1 ? true : false);
    record->SetRequiresMitmProtection(device.GetRequiresMitmProtection() == 1 ? true : false);
+0 −13
Original line number Diff line number Diff line
@@ -424,19 +424,6 @@
#define BTM_LOCAL_IO_CAPS_BLE BTM_IO_CAP_KBDISP
#endif

/* The default MITM Protection Requirement (for Simple Pairing)
 * Possible values are BTM_AUTH_SP_YES or BTM_AUTH_SP_NO */
#ifndef BTM_DEFAULT_AUTH_REQ
#define BTM_DEFAULT_AUTH_REQ BTM_AUTH_SP_NO
#endif

/* The default MITM Protection Requirement for dedicated bonding using Simple
 * Pairing
 * Possible values are BTM_AUTH_AP_YES or BTM_AUTH_AP_NO */
#ifndef BTM_DEFAULT_DD_AUTH_REQ
#define BTM_DEFAULT_DD_AUTH_REQ BTM_AUTH_AP_YES
#endif

/* TRUE to include Sniff Subrating */
#ifndef BTM_SSR_INCLUDED
#define BTM_SSR_INCLUDED TRUE
+3 −3
Original line number Diff line number Diff line
@@ -2723,7 +2723,7 @@ void btm_io_capabilities_req(const RawAddress& p) {
   * loc_io_caps is initialized with the default value */
  evt_data.io_cap = btm_cb.devcb.loc_io_caps;
  evt_data.oob_data = BTM_OOB_NONE;
  evt_data.auth_req = BTM_DEFAULT_AUTH_REQ;
  evt_data.auth_req = BTM_AUTH_SP_NO;

  uint8_t err_code = 0;
  bool is_orig = true;
@@ -2760,7 +2760,7 @@ void btm_io_capabilities_req(const RawAddress& p) {

      if (btm_cb.pairing_flags & BTM_PAIR_FLAGS_PEER_STARTED_DD) {
        /* acceptor in dedicated bonding */
        evt_data.auth_req = BTM_DEFAULT_DD_AUTH_REQ;
        evt_data.auth_req = BTM_AUTH_AP_YES;
      }
      break;

@@ -2768,7 +2768,7 @@ void btm_io_capabilities_req(const RawAddress& p) {
    initiated by local device */
    case BTM_PAIR_STATE_WAIT_PIN_REQ:
      if (evt_data.bd_addr == btm_cb.pairing_bda) {
        evt_data.auth_req = BTM_DEFAULT_DD_AUTH_REQ;
        evt_data.auth_req = BTM_AUTH_AP_YES;
      } else {
        err_code = HCI_ERR_HOST_BUSY_PAIRING;
      }