From 399e61353a86628ecde1c7050e3c28b6ba2c5a0d Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 26 Jan 2015 02:00:18 +0200 Subject: [PATCH] Add Suite B AKMs to key_mgmt capability list Signed-off-by: Jouni Malinen --- src/drivers/driver.h | 2 ++ src/drivers/driver_nl80211_capa.c | 6 ++++-- wpa_supplicant/ctrl_iface.c | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index 1d93cc07a..c9e860f8a 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -1072,6 +1072,8 @@ struct wpa_driver_capa { #define WPA_DRIVER_CAPA_KEY_MGMT_FT 0x00000020 #define WPA_DRIVER_CAPA_KEY_MGMT_FT_PSK 0x00000040 #define WPA_DRIVER_CAPA_KEY_MGMT_WAPI_PSK 0x00000080 +#define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B 0x00000100 +#define WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192 0x00000200 /** Bitfield of supported key management suites */ unsigned int key_mgmt; diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 6e52bdef2..36c8ce2b1 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -1,6 +1,6 @@ /* * Driver interaction with Linux nl80211/cfg80211 - Capabilities - * Copyright (c) 2002-2014, Jouni Malinen + * Copyright (c) 2002-2015, Jouni Malinen * Copyright (c) 2007, Johannes Berg * Copyright (c) 2009-2010, Atheros Communications * @@ -791,7 +791,9 @@ int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv) drv->capa.key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA | WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK | WPA_DRIVER_CAPA_KEY_MGMT_WPA2 | - WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK; + WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK | + WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B | + WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192; drv->capa.auth = WPA_DRIVER_AUTH_OPEN | WPA_DRIVER_AUTH_SHARED | WPA_DRIVER_AUTH_LEAP; diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index f2c80a369..caa480cb5 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -3503,6 +3503,23 @@ static int ctrl_iface_get_capability_key_mgmt(int res, char *strict, pos += ret; } +#ifdef CONFIG_SUITEB + if (capa->key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B) { + ret = os_snprintf(pos, end - pos, " WPA-EAP-SUITE-B"); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SUITEB */ +#ifdef CONFIG_SUITEB192 + if (capa->key_mgmt & WPA_DRIVER_CAPA_KEY_MGMT_SUITE_B_192) { + ret = os_snprintf(pos, end - pos, " WPA-EAP-SUITE-B-192"); + if (os_snprintf_error(end - pos, ret)) + return pos - buf; + pos += ret; + } +#endif /* CONFIG_SUITEB192 */ + return pos - buf; }