diff options
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r-- | net/bluetooth/hci_conn.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index b99b5c6de55a..f9ccda9a0220 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -1322,26 +1322,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn) conn->key_type != HCI_LK_AUTH_COMBINATION_P256) return 0; } + /* If Secure Simple Pairing is not enabled, then legacy connection + * setup is used and no encryption or key sizes can be enforced. + */ + if (!hci_conn_ssp_enabled(conn)) + return 1; - /* AES encryption is required for Level 4: - * - * BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C - * page 1319: - * - * 128-bit equivalent strength for link and encryption keys - * required using FIPS approved algorithms (E0 not allowed, - * SAFER+ not allowed, and P-192 not allowed; encryption key - * not shortened) - */ - if (conn->sec_level == BT_SECURITY_FIPS && - !test_bit(HCI_CONN_AES_CCM, &conn->flags)) { - bt_dev_err(conn->hdev, - "Invalid security: Missing AES-CCM usage"); - return 0; - } - - if (hci_conn_ssp_enabled(conn) && - !test_bit(HCI_CONN_ENCRYPT, &conn->flags)) + if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags)) return 0; return 1; |