diff options
author | Marcin Kraglak <marcin.kraglak@tieto.com> | 2014-07-30 11:38:48 +0200 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2014-07-30 12:32:44 +0200 |
commit | e2705e6da4d6f448d5b3ae435b1459443bcd1177 (patch) | |
tree | dc2c45cb50fdfd49ba270c3523ee58aca20c191c /android/hidhost.c | |
parent | 28e71a1283c0778e2359d6b25f2d00fa7028b07e (diff) | |
download | bluez-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.c | 5 |
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); |