aboutsummaryrefslogtreecommitdiffstats
path: root/tests/eapol-fuzzer
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-12-27 10:27:33 (GMT)
committerJouni Malinen <j@w1.fi>2017-12-27 10:27:33 (GMT)
commit7a27e5e03ed2f6625e23d8efc5cc6f0299464c92 (patch)
tree1aeecc7220c12c3c76f9c77274ff3b05b25bc4ee /tests/eapol-fuzzer
parent2d0a04a86ca01d82134bb6c0a5ad92301b767331 (diff)
downloadhostap-7a27e5e03ed2f6625e23d8efc5cc6f0299464c92.zip
hostap-7a27e5e03ed2f6625e23d8efc5cc6f0299464c92.tar.gz
hostap-7a27e5e03ed2f6625e23d8efc5cc6f0299464c92.tar.bz2
tests: Set PMK length in eapol-fuzzer
Commit b488a12948751f57871f09baa345e59b23959a41 ('Clear PMK length and check for this when deriving PTK') started rejecting PTK derivation based on PMK length. This reduced coverage from the eapol-fuzzer, so set the default length when initializing the state machine in the fuzzer to reach the previously used code paths. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests/eapol-fuzzer')
-rw-r--r--tests/eapol-fuzzer/eapol-fuzzer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/eapol-fuzzer/eapol-fuzzer.c b/tests/eapol-fuzzer/eapol-fuzzer.c
index 7429ee3..634278f 100644
--- a/tests/eapol-fuzzer/eapol-fuzzer.c
+++ b/tests/eapol-fuzzer/eapol-fuzzer.c
@@ -12,6 +12,7 @@
#include "utils/eloop.h"
#include "eapol_supp/eapol_supp_sm.h"
#include "rsn_supp/wpa.h"
+#include "rsn_supp/wpa_i.h"
struct arg_ctx {
@@ -142,7 +143,10 @@ static int init_wpa(struct arg_ctx *arg)
ctx->get_bssid = get_bssid;
arg->wpa = wpa_sm_init(ctx);
- return arg->wpa ? 0 : -1;
+ if (!arg->wpa)
+ return -1;
+ arg->wpa->pmk_len = PMK_LEN;
+ return 0;
}