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

Commit 3c3aa329 authored by Casper Bonde's avatar Casper Bonde Committed by Andre Eisenbach
Browse files

Add support for MITM for BluetoothSockets (4/4)



This change adds an option to enforce Man-in-the-middle protection
for the authentication process. This feature is needed for the Sim
Access Profile.

Change-Id: I2eda507ffdcb4a194434adedf207e1e9951b80c3
Signed-off-by: default avatarCasper Bonde <c.bonde@samsung.com>
parent 6b0b42f3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -176,6 +176,8 @@ static rfc_slot_t *alloc_rfc_slot(const bt_bdaddr_t *addr, const char *name, con
      security |= server ? BTM_SEC_IN_ENCRYPT : BTM_SEC_OUT_ENCRYPT;
  if(flags & BTSOCK_FLAG_AUTH)
      security |= server ? BTM_SEC_IN_AUTHENTICATE : BTM_SEC_OUT_AUTHENTICATE;
  if(flags & BTSOCK_FLAG_AUTH_MITM)
      security |= server ? BTM_SEC_IN_MITM : BTM_SEC_OUT_MITM;

  rfc_slot_t *slot = find_free_slot();
  if (!slot) {