mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 22:42:37 +01:00
unit: Add another EAPoL-Key frame test
This commit is contained in:
parent
5da6ca89e4
commit
1504e947ff
@ -144,6 +144,49 @@ static struct eapol_key_data eapol_key_test_2 = {
|
||||
.key_data_len = 22,
|
||||
};
|
||||
|
||||
static const unsigned char eapol_key_data_3[] = {
|
||||
0x02, 0x03, 0x00, 0x5f, 0x02, 0x00, 0x8a, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xbb, 0x57, 0xab, 0x58, 0x8f, 0x92,
|
||||
0xeb, 0xbd, 0x44, 0xe8, 0x11, 0x09, 0x4f, 0x60, 0x1c, 0x08, 0x79, 0x86,
|
||||
0x03, 0x0c, 0x3a, 0xc7, 0x49, 0xcc, 0x61, 0xd6, 0x3e, 0x33, 0x83, 0x2e,
|
||||
0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static struct eapol_key_data eapol_key_test_3 = {
|
||||
.frame = eapol_key_data_3,
|
||||
.frame_len = sizeof(eapol_key_data_3),
|
||||
.protocol_version = EAPOL_PROTOCOL_VERSION_2004,
|
||||
.packet_len = 95,
|
||||
.descriptor_type = EAPOL_DESCRIPTOR_TYPE_80211,
|
||||
.key_descriptor_version = EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_SHA1_AES,
|
||||
.key_type = true,
|
||||
.install = false,
|
||||
.key_ack = true,
|
||||
.key_mic = false,
|
||||
.secure = false,
|
||||
.error = false,
|
||||
.request = false,
|
||||
.encrypted_key_data = false,
|
||||
.smk_message = false,
|
||||
.key_length = 16,
|
||||
.key_replay_counter =
|
||||
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
.key_nonce = { 0xc2, 0xbb, 0x57, 0xab, 0x58, 0x8f, 0x92, 0xeb, 0xbd,
|
||||
0x44, 0xe8, 0x11, 0x09, 0x4f, 0x60, 0x1c, 0x08, 0x79,
|
||||
0x86, 0x03, 0x0c, 0x3a, 0xc7, 0x49, 0xcc, 0x61, 0xd6,
|
||||
0x3e, 0x33, 0x83, 0x2e, 0x50, },
|
||||
.eapol_key_iv = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
.key_rsc = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
.key_mic_data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
.key_data_len = 0,
|
||||
};
|
||||
|
||||
static void eapol_key_test(const void *data)
|
||||
{
|
||||
const struct eapol_key_data *test = data;
|
||||
@ -187,6 +230,8 @@ int main(int argc, char *argv[])
|
||||
eapol_key_test, &eapol_key_test_1);
|
||||
l_test_add("/EAPoL Key/Key Frame 2",
|
||||
eapol_key_test, &eapol_key_test_2);
|
||||
l_test_add("/EAPoL Key/Key Frame 3",
|
||||
eapol_key_test, &eapol_key_test_3);
|
||||
|
||||
return l_test_run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user