Bluetooth: Set correct security level for LE SC

If P256 key is present then authenticated link has FIPS security level.

Change-Id: Iaf50b83ac6973bbd40e5ef57bf1e6375eedf6b12
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2015-11-19 16:50:41 +01:00 committed by Anas Nashif
commit cd1ed791b4

View file

@ -777,7 +777,11 @@ static void update_sec_level(struct bt_conn *conn)
}
if (conn->keys && conn->keys->type == BT_KEYS_AUTHENTICATED) {
conn->sec_level = BT_SECURITY_HIGH;
if (conn->keys->keys & BT_KEYS_LTK_P256) {
conn->sec_level = BT_SECURITY_FIPS;
} else {
conn->sec_level = BT_SECURITY_HIGH;
}
} else {
conn->sec_level = BT_SECURITY_MEDIUM;
}