InvalidSAEElement for SAE negative testing
This extends ap_set_security and sta_set_security commands to support
the new InvalidSAEElement,hexdump argument to allow the SAE commit
message fields to be overridden.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
diff --git a/sta.c b/sta.c
index c6d6935..02b6ad7 100644
--- a/sta.c
+++ b/sta.c
@@ -1539,6 +1539,12 @@
}
}
+ val = get_param(cmd, "InvalidSAEElement");
+ if (val) {
+ free(dut->sae_commit_override);
+ dut->sae_commit_override = strdup(val);
+ }
+
return 1;
}
@@ -2373,6 +2379,16 @@
}
}
+ if (dut->sae_commit_override) {
+ snprintf(buf, sizeof(buf), "SET sae_commit_override %s",
+ dut->sae_commit_override);
+ if (wpa_command(get_station_ifname(), buf) < 0) {
+ send_resp(dut, conn, SIGMA_ERROR,
+ "ErrorCode,Failed to set SAE commit override");
+ return 0;
+ }
+ }
+
if (wps_param &&
(strcmp(wps_param, "1") == 0 || strcasecmp(wps_param, "On") == 0))
wps = 1;
@@ -4933,6 +4949,9 @@
free(dut->rsne_override);
dut->rsne_override = NULL;
+ free(dut->sae_commit_override);
+ dut->sae_commit_override = NULL;
+
if (dut->program != PROGRAM_VHT)
return cmd_sta_p2p_reset(dut, conn, cmd);
return 1;