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 2/2 test data + test
This commit is contained in:
parent
1b6240cd05
commit
cc97b53528
@ -1096,6 +1096,53 @@ static struct eapol_key_data eapol_key_test_23 = {
|
||||
.key_data_len = 32,
|
||||
};
|
||||
|
||||
/*
|
||||
* WPA Group Handshake frame, 2 of 2. For parameters
|
||||
* see eapol_wpa2_handshake_test
|
||||
*/
|
||||
static const unsigned char eapol_key_data_24[] = {
|
||||
0x01, 0x03, 0x00, 0x5f, 0xfe, 0x03, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 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, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4f, 0x06, 0x47,
|
||||
0x53, 0x9a, 0x1d, 0x3f, 0x9c, 0x02, 0x50, 0xb5, 0xc0, 0x40, 0x6b, 0x97,
|
||||
0xf8, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static struct eapol_key_data eapol_key_test_24 = {
|
||||
.frame = eapol_key_data_24,
|
||||
.frame_len = sizeof(eapol_key_data_24),
|
||||
.protocol_version = EAPOL_PROTOCOL_VERSION_2001,
|
||||
.packet_len = 95,
|
||||
.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 = false,
|
||||
.key_mic = true,
|
||||
.secure = true,
|
||||
.error = false,
|
||||
.request = false,
|
||||
.encrypted_key_data = false,
|
||||
.smk_message = false,
|
||||
.key_length = 0,
|
||||
.key_replay_counter = 2,
|
||||
.key_nonce = { 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 },
|
||||
.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 = { 0x4f, 0x06, 0x47, 0x53, 0x9a, 0x1d, 0x3f, 0x9c, 0x02,
|
||||
0x50, 0xb5, 0xc0, 0x40, 0x6b, 0x97, 0xf8 },
|
||||
.key_data_len = 0,
|
||||
};
|
||||
|
||||
static void eapol_key_test(const void *data)
|
||||
{
|
||||
const struct eapol_key_data *test = data;
|
||||
@ -1956,6 +2003,8 @@ int main(int argc, char *argv[])
|
||||
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/Key Frame 24",
|
||||
eapol_key_test, &eapol_key_test_24);
|
||||
|
||||
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