summaryrefslogtreecommitdiff
path: root/android/hidhost.c
diff options
context:
space:
mode:
authorMarcin Kraglak <marcin.kraglak@tieto.com>2014-07-30 11:38:48 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-07-30 12:32:44 +0200
commite2705e6da4d6f448d5b3ae435b1459443bcd1177 (patch)
treedc2c45cb50fdfd49ba270c3523ee58aca20c191c /android/hidhost.c
parent28e71a1283c0778e2359d6b25f2d00fa7028b07e (diff)
downloadbluez-e2705e6da4d6f448d5b3ae435b1459443bcd1177.tar.gz
anroid/hidhost: Set security to MEDIUM after connect
According to spec connection with HoG device should always be encrypted.
Diffstat (limited to 'android/hidhost.c')
-rw-r--r--android/hidhost.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/android/hidhost.c b/android/hidhost.c
index 4b718c6d8..da5f81891 100644
--- a/android/hidhost.c
+++ b/android/hidhost.c
@@ -802,6 +802,11 @@ static void hog_conn_cb(const bdaddr_t *addr, int err, void *attrib)
goto fail;
}
+ if (!bt_gatt_set_security(addr, BT_IO_SEC_MEDIUM)) {
+ error("Failed to set security level");
+ goto fail;
+ }
+
DBG("");
bt_hid_notify_state(dev, HAL_HIDHOST_STATE_CONNECTED);