mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
unit: Add WPA1 Step 4/4 test data + test
This commit is contained in:
parent
bbbd8f67d3
commit
a684e64dbb
@ -1003,6 +1003,50 @@ static struct eapol_key_data eapol_key_test_21 = {
|
||||
.key_data_len = 24,
|
||||
};
|
||||
|
||||
/* WPA frame, 4 of 4. For parameters see eapol_wpa2_handshake_test */
|
||||
static const unsigned char eapol_key_data_22[] = {
|
||||
0x01, 0x03, 0x00, 0x5f, 0xfe, 0x01, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 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, 0x37, 0xbc, 0x08,
|
||||
0x98, 0x99, 0x33, 0x1a, 0x70, 0xed, 0xa5, 0xb5, 0xb7, 0x54, 0xf5, 0x5f,
|
||||
0x06, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static struct eapol_key_data eapol_key_test_22 = {
|
||||
.frame = eapol_key_data_22,
|
||||
.frame_len = sizeof(eapol_key_data_22),
|
||||
.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 = true,
|
||||
.wpa_key_id = 0,
|
||||
.install = false,
|
||||
.key_ack = false,
|
||||
.key_mic = true,
|
||||
.secure = false,
|
||||
.error = false,
|
||||
.request = false,
|
||||
.encrypted_key_data = false,
|
||||
.smk_message = false,
|
||||
.key_length = 0,
|
||||
.key_replay_counter = 1,
|
||||
.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 = { 0x37, 0xbc, 0x08, 0x98, 0x99, 0x33, 0x1a, 0x70, 0xed,
|
||||
0xa5, 0xb5, 0xb7, 0x54, 0xf5, 0x5f, 0x06 },
|
||||
.key_data_len = 0,
|
||||
};
|
||||
|
||||
static void eapol_key_test(const void *data)
|
||||
{
|
||||
const struct eapol_key_data *test = data;
|
||||
@ -1859,6 +1903,8 @@ int main(int argc, char *argv[])
|
||||
eapol_key_test, &eapol_key_test_20);
|
||||
l_test_add("/EAPoL Key/Key Frame 21",
|
||||
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/MIC Test 1",
|
||||
eapol_key_mic_test, &eapol_key_mic_test_1);
|
||||
|
Loading…
Reference in New Issue
Block a user