mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
Bluetooth: Set the correct security level for SC LTKs
When the looked-up LTK is one generated by Secure Connections pairing the security level it gives is BT_SECURITY_FIPS. This patch updates the LTK request event handler to correctly set this level. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
23fb8de376
commit
8f5eeca321
@ -163,8 +163,12 @@ static inline bool smp_ltk_is_sc(struct smp_ltk *key)
|
||||
|
||||
static inline u8 smp_ltk_sec_level(struct smp_ltk *key)
|
||||
{
|
||||
if (key->authenticated)
|
||||
return BT_SECURITY_HIGH;
|
||||
if (key->authenticated) {
|
||||
if (smp_ltk_is_sc(key))
|
||||
return BT_SECURITY_FIPS;
|
||||
else
|
||||
return BT_SECURITY_HIGH;
|
||||
}
|
||||
|
||||
return BT_SECURITY_MEDIUM;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user