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 <lyle.zhu@nxp.com>
This commit is contained in:
parent
58f6ca80ca
commit
b59bc363ea
1 changed files with 6 additions and 0 deletions
|
@ -1048,6 +1048,12 @@ static void smp_br_derive_ltk(struct bt_smp_br *smp)
|
|||
keys->flags &= ~BT_KEYS_AUTHENTICATED;
|
||||
}
|
||||
|
||||
if (conn->encrypt == BT_HCI_ENCRYPTION_ON_BR_AES_CCM) {
|
||||
keys->flags |= BT_KEYS_SC;
|
||||
} else {
|
||||
keys->flags &= ~BT_KEYS_SC;
|
||||
}
|
||||
|
||||
LOG_DBG("LTK derived from LinkKey");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue