Browse Source

HS 2.0R2: Write OSEN key_mgmt value to config file

This was forgotten when the parser for key_mgmt=OSEN was added.

Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen 10 years ago
parent
commit
2d6ee86f9b
1 changed files with 12 additions and 0 deletions
  1. 12 0
      wpa_supplicant/config.c

+ 12 - 0
wpa_supplicant/config.c

@@ -699,6 +699,18 @@ static char * wpa_config_write_key_mgmt(const struct parse_data *data,
 	}
 #endif /* CONFIG_SAE */
 
+#ifdef CONFIG_HS20
+	if (ssid->key_mgmt & WPA_KEY_MGMT_OSEN) {
+		ret = os_snprintf(pos, end - pos, "%sOSEN",
+				  pos == buf ? "" : " ");
+		if (ret < 0 || ret >= end - pos) {
+			end[-1] = '\0';
+			return buf;
+		}
+		pos += ret;
+	}
+#endif /* CONFIG_HS20 */
+
 	if (pos == buf) {
 		os_free(buf);
 		buf = NULL;