Message ID | 20200331082810.10856-2-michal.lowas-rzechonek@silvair.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Brian Gix |
Headers | show |
Series | Honor provisioner's capabilities during authentication | expand |
On Tue, 2020-03-31 at 10:28 +0200, Michał Lowas-Rzechonek wrote: > --- > tools/mesh-cfgclient.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c > index ae13c4409..eafabf825 100644 > --- a/tools/mesh-cfgclient.c > +++ b/tools/mesh-cfgclient.c > @@ -1533,6 +1533,17 @@ static struct l_dbus_message *scan_result_call(struct l_dbus *dbus, > bt_shell_printf("\t" COLOR_GREEN "UUID = %s\n" COLOR_OFF, str); > l_free(str); > > + if (n >= 18) { > + str = l_util_hexstring_upper(prov_data + 16, 2); > + bt_shell_printf("\t" COLOR_GREEN "OOB = %s\n" COLOR_OFF, str); l_util_hexstring_upper() returns a newly allocated string. l_free(str) after it's no longer needed. > + } > + > + if (n >= 22) { > + str = l_util_hexstring_upper(prov_data + 18, 4); > + bt_shell_printf("\t" COLOR_GREEN "URI Hash = %s\n" COLOR_OFF, > + str); l_util_hexstring_upper() returns a newly allocated string. l_free(str) after it's no longer needed. > + } > + > /* TODO: Handle the rest of provisioning data if present */ > > dev = l_queue_find(devices, match_device_uuid, prov_data);
diff --git a/tools/mesh-cfgclient.c b/tools/mesh-cfgclient.c index ae13c4409..eafabf825 100644 --- a/tools/mesh-cfgclient.c +++ b/tools/mesh-cfgclient.c @@ -1533,6 +1533,17 @@ static struct l_dbus_message *scan_result_call(struct l_dbus *dbus, bt_shell_printf("\t" COLOR_GREEN "UUID = %s\n" COLOR_OFF, str); l_free(str); + if (n >= 18) { + str = l_util_hexstring_upper(prov_data + 16, 2); + bt_shell_printf("\t" COLOR_GREEN "OOB = %s\n" COLOR_OFF, str); + } + + if (n >= 22) { + str = l_util_hexstring_upper(prov_data + 18, 4); + bt_shell_printf("\t" COLOR_GREEN "URI Hash = %s\n" COLOR_OFF, + str); + } + /* TODO: Handle the rest of provisioning data if present */ dev = l_queue_find(devices, match_device_uuid, prov_data);