Bluetooth: Add support for P256 Link Keys
If P256 Link Key is received in Link Key notification event is should be marked appropriately. Change-Id: I09c2f5560d95dd360ef046330e5d85451b02821c Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
d48f19d3cc
commit
0bb0acc8a7
1 changed files with 14 additions and 0 deletions
|
@ -1232,6 +1232,20 @@ static void link_key_notify(struct net_buf *buf)
|
|||
atomic_set_bit(conn->flags, BT_CONN_BR_NOBOND);
|
||||
}
|
||||
|
||||
memcpy(conn->br.link_key->val, evt->link_key, 16);
|
||||
break;
|
||||
case BT_LK_AUTH_COMBINATION_P256:
|
||||
atomic_set_bit(conn->br.link_key->flags,
|
||||
BT_LINK_KEY_AUTHENTICATED);
|
||||
/* fall through */
|
||||
case BT_LK_UNAUTH_COMBINATION_P256:
|
||||
atomic_set_bit(conn->br.link_key->flags, BT_LINK_KEY_SC);
|
||||
|
||||
/* Mark no-bond so that link-key is removed on disconnection */
|
||||
if (bt_conn_ssp_get_auth(conn) < BT_HCI_DEDICATED_BONDING) {
|
||||
atomic_set_bit(conn->flags, BT_CONN_BR_NOBOND);
|
||||
}
|
||||
|
||||
memcpy(conn->br.link_key->val, evt->link_key, 16);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue