Add Suite B AKMs to key_mgmt capability list
authorJouni Malinen <j@w1.fi>
Mon, 26 Jan 2015 00:00:18 +0000 (02:00 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 26 Jan 2015 23:43:55 +0000 (01:43 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/driver.h
src/drivers/driver_nl80211_capa.c
wpa_supplicant/ctrl_iface.c

index 1d93cc0..c9e860f 100644 (file)
@@ -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;
 
index 6e52bde..36c8ce2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Driver interaction with Linux nl80211/cfg80211 - Capabilities
- * Copyright (c) 2002-2014, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2002-2015, Jouni Malinen <j@w1.fi>
  * Copyright (c) 2007, Johannes Berg <johannes@sipsolutions.net>
  * 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;
index f2c80a3..caa480c 100644 (file)
@@ -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;
 }