gatt: Require medium security for ATT socket over BR/EDR
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 3 Jul 2019 15:39:20 +0000 (18:39 +0300)
committerhimanshu <h.himanshu@samsung.com>
Tue, 11 Feb 2020 08:57:47 +0000 (14:27 +0530)
Encryption is required according to the spec:

  BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part G page 2397:

  5.1.2 BR/EDR channel requirements

  The channel shall be encrypted. The Key_Type shall be either an
  Unauthenticated Combination Key or an Authenticated Combination Key.

Change-Id: I1cf0647421e2aeb7db0136758a33d626192c56c7
Signed-off-by: himanshu <h.himanshu@samsung.com>
src/gatt-database.c

index 45801d5..eb268e3 100644 (file)
@@ -4119,7 +4119,7 @@ struct btd_gatt_database *btd_gatt_database_new(struct btd_adapter *adapter)
        database->l2cap_io = bt_io_listen(connect_cb, NULL, NULL, NULL, &gerr,
                                        BT_IO_OPT_SOURCE_BDADDR, addr,
                                        BT_IO_OPT_PSM, ATT_PSM,
-                                       BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
+                                       BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM,
                                        BT_IO_OPT_MTU, main_opts.gatt_mtu,
                                        BT_IO_OPT_INVALID);
        if (database->l2cap_io == NULL) {