]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Show SAE capabilities in control interface
authorJouni Malinen <jouni@codeaurora.org>
Sat, 30 May 2020 20:30:42 +0000 (23:30 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 2 Jun 2020 20:25:22 +0000 (23:25 +0300)
Indicate local support for SAE H2E and SAE-PK.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
wpa_supplicant/ctrl_iface.c

index 7569beddcf163735a52f961238866f60e0e0eaf9..e727dc5bbae774797b179a142b0cc693bb9d54b4 100644 (file)
@@ -4726,6 +4726,20 @@ static int wpa_supplicant_ctrl_iface_get_capability(
        }
 #endif /* CONFIG_DPP */
 
+#ifdef CONFIG_SAE
+       if (os_strcmp(field, "sae") == 0 &&
+           (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SAE)) {
+#ifdef CONFIG_SAE_PK
+               res = os_snprintf(buf, buflen, "H2E PK");
+#else /* CONFIG_SAE_PK */
+               res = os_snprintf(buf, buflen, "H2E");
+#endif /* CONFIG_SAE_PK */
+               if (os_snprintf_error(buflen, res))
+                       return -1;
+               return res;
+       }
+#endif /* CONFIG_SAE */
+
        wpa_printf(MSG_DEBUG, "CTRL_IFACE: Unknown GET_CAPABILITY field '%s'",
                   field);