aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-02-02 15:00:12 (GMT)
committerJouni Malinen <j@w1.fi>2011-02-02 15:00:12 (GMT)
commitd1c8ac88b9dea5925fc66a9ab8b54a4b77e353fa (patch)
treea5aec74b656b4d0527498c47b7770cc4acac2dbd /wpa_supplicant/wps_supplicant.c
parent0661eed204553d869ddbd3bed050385797d6fa2a (diff)
downloadhostap-d1c8ac88b9dea5925fc66a9ab8b54a4b77e353fa.zip
hostap-d1c8ac88b9dea5925fc66a9ab8b54a4b77e353fa.tar.gz
hostap-d1c8ac88b9dea5925fc66a9ab8b54a4b77e353fa.tar.bz2
DBus: Publish provisioned keys in network properties
When the network was provisioned, we need to get the keys to be able to reconnect without new provisioning. To be able to publish those keys but not normally configured ones, add a new attribute to struct wpa_ssid indicating whether or not keys may be exported. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index d93db46..8100f1c 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -372,6 +372,7 @@ static int wpa_supplicant_wps_cred(void *ctx,
return -1;
}
ssid->psk_set = 1;
+ ssid->export_keys = 1;
} else if (cred->key_len >= 8 && cred->key_len < 2 * PMK_LEN) {
os_free(ssid->passphrase);
ssid->passphrase = os_malloc(cred->key_len + 1);
@@ -380,6 +381,7 @@ static int wpa_supplicant_wps_cred(void *ctx,
os_memcpy(ssid->passphrase, cred->key, cred->key_len);
ssid->passphrase[cred->key_len] = '\0';
wpa_config_update_psk(ssid);
+ ssid->export_keys = 1;
} else {
wpa_printf(MSG_ERROR, "WPS: Invalid Network Key "
"length %lu",