diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 22cd2aa..0e37769 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
bool reject_confirm;
bool client_reject_confirm;
bool just_works;
- bool sc;
+ bool client_enable_sc;
+ bool expect_sc_key;
bool force_power_off;
};
return false;
}
- if (test->sc && !ltk_is_sc(&ev->key)) {
+ if (test->expect_sc_key && !ltk_is_sc(&ev->key)) {
tester_warn("Non-LE SC key for SC pairing");
return false;
}
- if (!test->sc && ltk_is_sc(&ev->key)) {
+ if (!test->expect_sc_key && ltk_is_sc(&ev->key)) {
tester_warn("SC key for Non-SC pairing");
return false;
}
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
.just_works = true,
- .sc = true,
+ .client_enable_sc = true,
+ .expect_sc_key = true,
.expect_status = MGMT_STATUS_SUCCESS,
.expect_func = pair_device_expect_param_func,
.expect_alt_ev = MGMT_EV_NEW_LONG_TERM_KEY,
.setup_settings = settings_powered_sc_bondable,
.send_opcode = MGMT_OP_PAIR_DEVICE,
.send_func = pair_device_send_param_func,
- .sc = true,
+ .client_enable_sc = true,
+ .expect_sc_key = true,
.io_cap = 0x02, /* KeyboardOnly */
.client_io_cap = 0x02, /* KeyboardOnly */
.expect_status = MGMT_STATUS_SUCCESS,
if (test->client_io_cap)
bthost_set_io_capability(bthost, test->client_io_cap);
- if (test->sc)
- bthost_set_sc_support(bthost, test->sc);
-
if (test->client_auth_req)
bthost_set_auth_req(bthost, test->client_auth_req);
else if (!test->just_works)
if (test->client_reject_confirm)
bthost_set_reject_user_confirm(bthost, true);
+ if (test->client_enable_sc)
+ bthost_set_sc_support(bthost, 0x01);
+
proceed:
if (!test || !test->setup_settings) {
if (data->test_setup)