Bluetooth: Mark AES encrypted BR/EDR link as FIPS security level

If enctyption changed event is recevied with value 0x02 it means
that AES-CCM is used for BR/EDR encryption. If link is also
authenticated then security level is FIPS.

Change-Id: I33cd1b87c6e4fb359018739e76ac4e72a777128e
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-08-12 14:11:57 +02:00 committed by Johan Hedberg
commit b9610c392b

View file

@ -1108,7 +1108,11 @@ static void update_sec_level_br(struct bt_conn *conn)
if (conn->br.link_key) {
if (atomic_test_bit(conn->br.link_key->flags,
BT_LINK_KEY_AUTHENTICATED)) {
conn->sec_level = BT_SECURITY_HIGH;
if (conn->encrypt == 0x02) {
conn->sec_level = BT_SECURITY_FIPS;
} else {
conn->sec_level = BT_SECURITY_HIGH;
}
} else {
conn->sec_level = BT_SECURITY_MEDIUM;
}