diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2021-04-06 21:55:56 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-04-08 12:26:34 +0200 |
commit | a61d67188f29ff678e94fb3ffba6c6d292e852c7 (patch) | |
tree | 393fadea53dafe200d9bac188e9ca18972084e53 /net/bluetooth/mgmt.c | |
parent | ba29d0360a092997074e07524cf6f798a95a71d8 (diff) | |
download | linux-stable-a61d67188f29ff678e94fb3ffba6c6d292e852c7.tar.gz linux-stable-a61d67188f29ff678e94fb3ffba6c6d292e852c7.tar.bz2 linux-stable-a61d67188f29ff678e94fb3ffba6c6d292e852c7.zip |
Bluetooth: Allow Microsoft extension to indicate curve validation
Some controllers don't support the Simple Pairing Options feature that
can indicate the support for P-192 and P-256 public key validation.
However they might support the Microsoft vendor extension that can
indicate the validiation capability as well.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 59f8016c4866..f9be7f9084d6 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3730,8 +3730,11 @@ static int read_controller_cap(struct sock *sk, struct hci_dev *hdev, /* When the Read Simple Pairing Options command is supported, then * the remote public key validation is supported. + * + * Alternatively, when Microsoft extensions are available, they can + * indicate support for public key validation as well. */ - if (hdev->commands[41] & 0x08) + if ((hdev->commands[41] & 0x08) || msft_curve_validity(hdev)) flags |= 0x01; /* Remote public key validation (BR/EDR) */ flags |= 0x02; /* Remote public key validation (LE) */ |