mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
unit: Add WPA1 GTK Step 1/2 test data + test
This commit is contained in:
parent
a684e64dbb
commit
1b6240cd05
@ -1047,6 +1047,55 @@ static struct eapol_key_data eapol_key_test_22 = {
|
||||
.key_data_len = 0,
|
||||
};
|
||||
|
||||
/*
|
||||
* WPA Group Handshake frame, 1 of 2. For parameters
|
||||
* see eapol_wpa2_handshake_test
|
||||
*/
|
||||
static const unsigned char eapol_key_data_23[] = {
|
||||
0x01, 0x03, 0x00, 0x7f, 0xfe, 0x03, 0xa1, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x6a, 0x65, 0xcf, 0x21, 0x0d, 0x51, 0xeb,
|
||||
0xd6, 0xca, 0x3e, 0xc9, 0xee, 0xc9, 0xd9, 0xad, 0x2f, 0x14, 0x13, 0x8d,
|
||||
0xb9, 0x33, 0xa1, 0xbb, 0xed, 0x94, 0x26, 0xa1, 0x73, 0x48, 0xc8, 0x4d,
|
||||
0x4a, 0x0d, 0x8c, 0xe1, 0x3f, 0x1c, 0x0c, 0x52, 0x55, 0x00, 0xe5, 0x04,
|
||||
0xe5, 0xbd, 0x46, 0x94, 0xdb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0xa3, 0x27,
|
||||
0x7c, 0x85, 0x47, 0xd5, 0x3f, 0x35, 0xaf, 0x86, 0xc2, 0x2c, 0xcb, 0xb3,
|
||||
0x87, 0x00, 0x20, 0xc8, 0xb3, 0x61, 0xc0, 0x71, 0x5d, 0x2e, 0x9a, 0x6a,
|
||||
0x78, 0xdf, 0xfe, 0x0d, 0x64, 0x11, 0x23, 0xd9, 0xcc, 0xc6, 0x44, 0x65,
|
||||
0x76, 0xba, 0x82, 0xd5, 0x08, 0x4b, 0x4e, 0x51, 0xc2, 0x6a, 0x3f,
|
||||
};
|
||||
|
||||
static struct eapol_key_data eapol_key_test_23 = {
|
||||
.frame = eapol_key_data_23,
|
||||
.frame_len = sizeof(eapol_key_data_23),
|
||||
.protocol_version = EAPOL_PROTOCOL_VERSION_2001,
|
||||
.packet_len = 127,
|
||||
.descriptor_type = EAPOL_DESCRIPTOR_TYPE_WPA,
|
||||
.key_descriptor_version = EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_MD5_ARC4,
|
||||
.key_type = false,
|
||||
.wpa_key_id = 2,
|
||||
.install = false,
|
||||
.key_ack = true,
|
||||
.key_mic = true,
|
||||
.secure = true,
|
||||
.error = false,
|
||||
.request = false,
|
||||
.encrypted_key_data = false,
|
||||
.smk_message = false,
|
||||
.key_length = 32,
|
||||
.key_replay_counter = 2,
|
||||
.key_nonce = { 0x6a, 0x65, 0xcf, 0x21, 0x0d, 0x51, 0xeb, 0xd6, 0xca,
|
||||
0x3e, 0xc9, 0xee, 0xc9, 0xd9, 0xad, 0x2f, 0x14, 0x13,
|
||||
0x8d, 0xb9, 0x33, 0xa1, 0xbb, 0xed, 0x94, 0x26, 0xa1,
|
||||
0x73, 0x48, 0xc8, 0x4d, 0x4a },
|
||||
.eapol_key_iv = { 0x0d, 0x8c, 0xe1, 0x3f, 0x1c, 0x0c, 0x52, 0x55, 0x00,
|
||||
0xe5, 0x04, 0xe5, 0xbd, 0x46, 0x94, 0xdb },
|
||||
.key_rsc = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||
.key_mic_data = { 0xe5, 0xa3, 0x27, 0x7c, 0x85, 0x47, 0xd5, 0x3f, 0x35,
|
||||
0xaf, 0x86, 0xc2, 0x2c, 0xcb, 0xb3, 0x87 },
|
||||
.key_data_len = 32,
|
||||
};
|
||||
|
||||
static void eapol_key_test(const void *data)
|
||||
{
|
||||
const struct eapol_key_data *test = data;
|
||||
@ -1905,6 +1954,8 @@ int main(int argc, char *argv[])
|
||||
eapol_key_test, &eapol_key_test_21);
|
||||
l_test_add("/EAPoL Key/Key Frame 22",
|
||||
eapol_key_test, &eapol_key_test_22);
|
||||
l_test_add("/EAPoL Key/Key Frame 23",
|
||||
eapol_key_test, &eapol_key_test_23);
|
||||
|
||||
l_test_add("/EAPoL Key/MIC Test 1",
|
||||
eapol_key_mic_test, &eapol_key_mic_test_1);
|
||||
|
Loading…
Reference in New Issue
Block a user