diff --git a/wlantest/bss.c b/wlantest/bss.c index 94f2580b6..d554853a3 100644 --- a/wlantest/bss.c +++ b/wlantest/bss.c @@ -92,7 +92,7 @@ int bss_add_pmk_from_passphrase(struct wlantest_bss *bss, pmk = os_zalloc(sizeof(*pmk)); if (pmk == NULL) return -1; - if (pbkdf2_sha1(passphrase, (char *) bss->ssid, bss->ssid_len, 4096, + if (pbkdf2_sha1(passphrase, bss->ssid, bss->ssid_len, 4096, pmk->pmk, sizeof(pmk->pmk)) < 0) { os_free(pmk); return -1; diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c index 7f2015d30..a4e6e26e5 100644 --- a/wlantest/rx_eapol.c +++ b/wlantest/rx_eapol.c @@ -648,7 +648,6 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst, struct wlantest_sta *sta; const struct ieee802_1x_hdr *eapol; const struct wpa_eapol_key *hdr; - const u8 *key_data; u16 key_info, ver; u8 *decrypted; size_t decrypted_len = 0; @@ -679,7 +678,6 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst, } wpa_printf(MSG_DEBUG, "Valid MIC found in EAPOL-Key 1/2"); - key_data = (const u8 *) (hdr + 1); if (sta->proto & WPA_PROTO_RSN && !(key_info & WPA_KEY_INFO_ENCR_KEY_DATA)) { wpa_printf(MSG_INFO, "EAPOL-Key 1/2 without EncrKeyData bit");