From 7800725afb27397f7d6033d4969e2aeb61af4737 Mon Sep 17 00:00:00 2001 Message-Id: <7800725afb27397f7d6033d4969e2aeb61af4737.1602780273.git.davide.caratti@gmail.com> From: Beniamino Galvani Date: Sun, 13 Oct 2019 15:18:54 +0200 Subject: [PATCH] dbus: Export OWE capability and OWE BSS key_mgmt Export a new 'owe' capability to indicate that wpa_supplicant was built with OWE support and accepts 'key_mgmt=OWE'. Also, support 'owe' in the array of BSS' available key managements. Signed-off-by: Beniamino Galvani --- wpa_supplicant/dbus/dbus_new_handlers.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c index d2c84e5c5..1206c3cde 100644 --- a/wpa_supplicant/dbus/dbus_new_handlers.c +++ b/wpa_supplicant/dbus/dbus_new_handlers.c @@ -984,8 +984,7 @@ dbus_bool_t wpas_dbus_getter_global_capabilities( const struct wpa_dbus_property_desc *property_desc, DBusMessageIter *iter, DBusError *error, void *user_data) { - const char *capabilities[10] = { NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL }; + const char *capabilities[11]; size_t num_items = 0; #ifdef CONFIG_FILS struct wpa_global *global = user_data; @@ -1028,6 +1027,9 @@ dbus_bool_t wpas_dbus_getter_global_capabilities( #ifdef CONFIG_SHA384 capabilities[num_items++] = "sha384"; #endif /* CONFIG_SHA384 */ +#ifdef CONFIG_OWE + capabilities[num_items++] = "owe"; +#endif /* CONFIG_OWE */ return wpas_dbus_simple_array_property_getter(iter, DBUS_TYPE_STRING, @@ -4491,7 +4493,7 @@ static dbus_bool_t wpas_dbus_get_bss_security_prop( DBusMessageIter iter_dict, variant_iter; const char *group; const char *pairwise[5]; /* max 5 pairwise ciphers is supported */ - const char *key_mgmt[15]; /* max 15 key managements may be supported */ + const char *key_mgmt[16]; /* max 16 key managements may be supported */ int n; if (!dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, @@ -4544,6 +4546,10 @@ static dbus_bool_t wpas_dbus_get_bss_security_prop( if (ie_data->key_mgmt & WPA_KEY_MGMT_FT_SAE) key_mgmt[n++] = "ft-sae"; #endif /* CONFIG_SAE */ +#ifdef CONFIG_OWE + if (ie_data->key_mgmt & WPA_KEY_MGMT_OWE) + key_mgmt[n++] = "owe"; +#endif /* CONFIG_OWE */ if (ie_data->key_mgmt & WPA_KEY_MGMT_NONE) key_mgmt[n++] = "wpa-none"; -- 2.26.2