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

Commit de136d6b authored by Myles Watson's avatar Myles Watson
Browse files

RootCanal: Allow both sides to have OOB data

Bug: 162984360
Tag: #gd-refactor
Test: cert/run --host SecurityTest
Change-Id: I1c30296ec80aaac883fc3012982bf6fb76c34771
parent a6216543
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -130,16 +130,16 @@ PairingType SecurityManager::GetSimplePairingType() {
  bool peer_requires_mitm = (peer_authentication_requirements_ == AuthenticationType::NO_BONDING_MITM) ||
                            (peer_authentication_requirements_ == AuthenticationType::DEDICATED_BONDING_MITM) ||
                            (peer_authentication_requirements_ == AuthenticationType::GENERAL_BONDING_MITM);
  if (!(peer_requires_mitm || host_requires_mitm)) {
    return PairingType::AUTO_CONFIRMATION;
  }
  if (peer_oob_present_flag_ != 0 || host_oob_present_flag_ != 0) {
    if (peer_oob_present_flag_ != 0) {
    if (host_oob_present_flag_ == 0) {
      return PairingType::PEER_HAS_OUT_OF_BAND;
    } else {
      return PairingType::OUT_OF_BAND;
    }
  }
  if (!(peer_requires_mitm || host_requires_mitm)) {
    return PairingType::AUTO_CONFIRMATION;
  }
  LOG_INFO("%s: host does%s require peer does%s require MITM",
           peer_address_.ToString().c_str(), host_requires_mitm ? "" : "n't",
           peer_requires_mitm ? "" : "n't");