#ifdef CONFIG_TESTING_OPTIONS
} else if (os_strcmp(buf, "force_kdk_derivation") == 0) {
bss->force_kdk_derivation = atoi(pos);
+ } else if (os_strcmp(buf, "pasn_corrupt_mic") == 0) {
+ bss->pasn_corrupt_mic = atoi(pos);
#endif /* CONFIG_TESTING_OPTIONS */
} else if (os_strcmp(buf, "pasn_groups") == 0) {
if (hostapd_parse_intlist(&bss->pasn_groups, pos)) {
* secure LTF. Allow forcing KDK derivation for testing purposes.
*/
int force_kdk_derivation;
+
+ /* If set, corrupt the MIC in the 2nd Authentication frame of PASN */
+ int pasn_corrupt_mic;
#endif /* CONFIG_TESTING_OPTIONS */
int *pasn_groups;
goto fail;
}
+#ifdef CONFIG_TESTING_OPTIONS
+ if (hapd->conf->pasn_corrupt_mic) {
+ wpa_printf(MSG_DEBUG, "PASN: frame 2: Corrupt MIC");
+ mic[0] = ~mic[0];
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
+
os_memcpy(ptr, mic, mic_len);
done:
#ifdef CONFIG_PASN
#ifdef CONFIG_TESTING_OPTIONS
{ INT_RANGE(force_kdk_derivation, 0, 1), 0 },
+ { INT_RANGE(pasn_corrupt_mic, 0, 1), 0 },
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_PASN */
};
* secure LTF. Allow forcing KDK derivation for testing purposes.
*/
int force_kdk_derivation;
+
+ /* If set, corrupt the MIC in the 3rd Authentication frame of PASN */
+ int pasn_corrupt_mic;
+
#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_PASN*/
};
goto fail;
}
+#ifdef CONFIG_TESTING_OPTIONS
+ if (wpa_s->conf->pasn_corrupt_mic) {
+ wpa_printf(MSG_DEBUG, "PASN: frame 3: Corrupt MIC");
+ mic[0] = ~mic[0];
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
+
os_memcpy(ptr, mic, mic_len);
pasn->trans_seq++;