[PATCH] wpa_supplicant: print password field only if -K is given

Helmut Schaa helmut.schaa
Tue Dec 9 01:09:41 PST 2008


Print the password field only if -K is given by using wpa_hexdump_ascii_key
instead of wpa_hexdump_ascii. Additionally mark the password field as key.

Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>

---
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index a452323..ed83145 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -1049,7 +1049,7 @@ static int wpa_config_parse_password(const struct parse_data *data,
 				   "password.", line);
 			return -1;
 		}
-		wpa_hexdump_ascii(MSG_MSGDUMP, data->name,
+		wpa_hexdump_ascii_key(MSG_MSGDUMP, data->name,
 				  (u8 *) tmp, res_len);
 
 		os_free(ssid->eap.password);
@@ -1321,7 +1321,7 @@ static const struct parse_data ssid_fields[] = {
 	{ FUNC(eap) },
 	{ STR_LENe(identity) },
 	{ STR_LENe(anonymous_identity) },
-	{ FUNC(password) },
+	{ FUNC_KEY(password) },
 	{ STRe(ca_cert) },
 	{ STRe(ca_path) },
 	{ STRe(client_cert) },



More information about the Hostap mailing list