Skip to content

Commit b59bc36

Browse files
lylezhu2012kartben
authored andcommitted
Bluetooth: Classic: SMP: Set secure connection for derived LTK
If the encrypt value of classic connection is `BT_HCI_ENCRYPTION_ON_BR_AES_CCM`, set the flag `BT_KEYS_SC` for the derived LTK. Or, clear the flag `BT_KEYS_SC` for the derived LTK. Signed-off-by: Lyle Zhu <[email protected]>
1 parent 58f6ca8 commit b59bc36

File tree

1 file changed

+6
-0
lines changed
  • subsys/bluetooth/host

1 file changed

+6
-0
lines changed

subsys/bluetooth/host/smp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,12 @@ static void smp_br_derive_ltk(struct bt_smp_br *smp)
10481048
keys->flags &= ~BT_KEYS_AUTHENTICATED;
10491049
}
10501050

1051+
if (conn->encrypt == BT_HCI_ENCRYPTION_ON_BR_AES_CCM) {
1052+
keys->flags |= BT_KEYS_SC;
1053+
} else {
1054+
keys->flags &= ~BT_KEYS_SC;
1055+
}
1056+
10511057
LOG_DBG("LTK derived from LinkKey");
10521058
}
10531059

0 commit comments

Comments
 (0)