On Mon, Mar 02, 2020 at 05:18:41AM +0530, Ganapathi Bhat wrote: > The commit a34ca59e (SAE: Allow SAE password to be configured > separately (STA)) added sae_password configuration option. We > should also consider sae_password, in wpa_config_write() function > which store the network details to external database. Thanks, applied with some changes to make this more accurate: > diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c > @@ -1620,7 +1620,7 @@ int wpa_config_write(const char *name, struct wpa_config *config) > if (ssid->key_mgmt == WPA_KEY_MGMT_WPS || ssid->temporary) > continue; /* do not save temporary networks */ > if (wpa_key_mgmt_wpa_psk(ssid->key_mgmt) && !ssid->psk_set && > - !ssid->passphrase) > + !ssid->passphrase && !ssid->sae_password) > continue; /* do not save invalid network */ Any network profile that enables PSK needs to have either the PSK or the passphrase configured. This change would accept network profile that have PSK (with or without SAE) and only sae_password while such cases are invalid. I modified this to split that check into two parts so that the PSK cases mandate that either psk_set or passphrase is available and the SAE cases mandate that either passphrase or sae_password is available. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap