aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/config.c
diff options
context:
space:
mode:
authorvamsi krishna <vamsin@qti.qualcomm.com>2017-04-06 16:19:34 (GMT)
committerJouni Malinen <j@w1.fi>2017-04-07 13:12:41 (GMT)
commit199eb3a4e6855047dc65dc8f85d9feec80c0f1e6 (patch)
treead78d31beac233cf2b2bbbbb7452dcc39b618630 /wpa_supplicant/config.c
parent16217e13d87f5022964d37cfb911296b639fa6cb (diff)
downloadhostap-199eb3a4e6855047dc65dc8f85d9feec80c0f1e6.zip
hostap-199eb3a4e6855047dc65dc8f85d9feec80c0f1e6.tar.gz
hostap-199eb3a4e6855047dc65dc8f85d9feec80c0f1e6.tar.bz2
FILS: Add support to write FILS key_mgmt values in network blocks
Add support to write FILS related key_mgmt values also while saving a network block. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/config.c')
-rw-r--r--wpa_supplicant/config.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 8bfb6a1..9e54f6c 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -938,6 +938,47 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
}
#endif /* CONFIG_SUITEB192 */
+#ifdef CONFIG_FILS
+ if (ssid->key_mgmt & WPA_KEY_MGMT_FILS_SHA256) {
+ ret = os_snprintf(pos, end - pos, "%sFILS-SHA256",
+ pos == buf ? "" : " ");
+ if (os_snprintf_error(end - pos, ret)) {
+ end[-1] = '\0';
+ return buf;
+ }
+ pos += ret;
+ }
+ if (ssid->key_mgmt & WPA_KEY_MGMT_FILS_SHA384) {
+ ret = os_snprintf(pos, end - pos, "%sFILS-SHA384",
+ pos == buf ? "" : " ");
+ if (os_snprintf_error(end - pos, ret)) {
+ end[-1] = '\0';
+ return buf;
+ }
+ pos += ret;
+ }
+#ifdef CONFIG_IEEE80211R
+ if (ssid->key_mgmt & WPA_KEY_MGMT_FT_FILS_SHA256) {
+ ret = os_snprintf(pos, end - pos, "%sFT-FILS-SHA256",
+ pos == buf ? "" : " ");
+ if (os_snprintf_error(end - pos, ret)) {
+ end[-1] = '\0';
+ return buf;
+ }
+ pos += ret;
+ }
+ if (ssid->key_mgmt & WPA_KEY_MGMT_FT_FILS_SHA384) {
+ ret = os_snprintf(pos, end - pos, "%sFT-FILS-SHA384",
+ pos == buf ? "" : " ");
+ if (os_snprintf_error(end - pos, ret)) {
+ end[-1] = '\0';
+ return buf;
+ }
+ pos += ret;
+ }
+#endif /* CONFIG_IEEE80211R */
+#endif /* CONFIG_FILS */
+
if (pos == buf) {
os_free(buf);
buf = NULL;