Bluetooth: BR/EDR: Mark P-192 EC link key as AUTHENTICATED

When link key generated by controller is derived from applied
non-JustWorks authentication method by using P-192 elliptic curve (EC)
algorithm, mark it as authenticated.

< HCI Command: User Confirmation Request Reply (0x01|0x002c) plen 6
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Command Complete (0x0e) plen 10
	User Confirmation Request Reply (0x01|0x002c) ncmd 1
	Status: Success (0x00)
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Simple Pairing Complete (0x36) plen 7
	Status: Success (0x00)
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
> HCI Event: Link Key Notification (0x18) plen 23
	Address: 00:1A:7D:DA:71:13 (cyber-blue(HK)Ltd)
	Link key: 1f0a22d608ee0025c2faea0282bd2479
	Key type: Authenticated Combination key from P-192 (0x05)

Change-Id: Id2afbdc9eb1b2ef66e850c4a53b91187b88e5c6b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-03-03 12:05:27 +01:00 committed by Johan Hedberg
commit 4e063354e9

View file

@ -1055,6 +1055,8 @@ static void link_key_notify(struct net_buf *buf)
atomic_set_bit(&conn->keys->flags,
BT_KEYS_AUTHENTICATED);
}
} else if (evt->key_type == BT_LK_AUTH_COMBINATION_P192) {
atomic_set_bit(&conn->keys->flags, BT_KEYS_AUTHENTICATED);
}
bt_conn_unref(conn);