aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2005-06-24 02:58:39 (GMT)
committerJouni Malinen <j@w1.fi>2005-06-24 02:58:39 (GMT)
commitbeaa1ce25528e2acbe7bf304fe060e0123b838aa (patch)
tree4b1d89a23eac34372b99a82e0f092535d922804b
parent5100f7b68f73e73d99541e6e6442afb536b5211e (diff)
downloadhostap-history-beaa1ce25528e2acbe7bf304fe060e0123b838aa.zip
hostap-history-beaa1ce25528e2acbe7bf304fe060e0123b838aa.tar.gz
hostap-history-beaa1ce25528e2acbe7bf304fe060e0123b838aa.tar.bz2
Use wpa_sm_set_pmk_from_pmksa() instead of copying PMK with the exact
same code elsewhere.
-rw-r--r--wpa_supplicant/wpa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa.c b/wpa_supplicant/wpa.c
index 20c844a..dec4b66 100644
--- a/wpa_supplicant/wpa.c
+++ b/wpa_supplicant/wpa.c
@@ -884,8 +884,7 @@ static int wpa_supplicant_get_pmk(struct wpa_supplicant *wpa_s,
if (pmkid && sm->cur_pmksa &&
memcmp(pmkid, sm->cur_pmksa->pmkid, PMKID_LEN) == 0) {
wpa_hexdump(MSG_DEBUG, "RSN: matched PMKID", pmkid, PMKID_LEN);
- sm->pmk_len = sm->cur_pmksa->pmk_len;
- memcpy(sm->pmk, sm->cur_pmksa->pmk, sm->pmk_len);
+ wpa_sm_set_pmk_from_pmksa(sm);
wpa_hexdump_key(MSG_DEBUG, "RSN: PMK from PMKSA cache",
sm->pmk, sm->pmk_len);
eapol_sm_notify_cached(wpa_s->eapol);