feat(ble): Add security related tests.

* Add security related tests to verify behavior when trying to read
  a GATT characteristic from our peripheral with and without client
  auto security request/retry.
This commit is contained in:
Pete Johanson
2024-01-03 16:55:26 -08:00
parent bc7b4b56bd
commit 69f962fab2
13 changed files with 148 additions and 19 deletions

View File

@@ -522,14 +522,6 @@ static void split_central_process_connection(struct bt_conn *conn) {
LOG_DBG("Current security for connection: %d", bt_conn_get_security(conn));
#if !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ)
err = bt_conn_set_security(conn, BT_SECURITY_L2);
if (err) {
LOG_ERR("Failed to set security (reason %d)", err);
return;
}
#endif // !IS_ENABLED(CONFIG_BT_GATT_AUTO_SEC_REQ)
struct peripheral_slot *slot = peripheral_slot_for_conn(conn);
if (slot == NULL) {
LOG_ERR("No peripheral state found for connection");