mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-29 05:39:24 +01:00
unit: Add WPA1 Step 3/4 test data + test
This commit is contained in:
parent
b6677680f2
commit
bbbd8f67d3
@ -957,6 +957,52 @@ static struct eapol_key_data eapol_key_test_20 = {
|
|||||||
.key_data_len = 24,
|
.key_data_len = 24,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* WPA frame, 3 of 4. For parameters see eapol_wpa2_handshake_test */
|
||||||
|
static const unsigned char eapol_key_data_21[] = {
|
||||||
|
0x01, 0x03, 0x00, 0x77, 0xfe, 0x01, 0xc9, 0x00, 0x20, 0x00, 0x00, 0x00,
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x01, 0x26, 0x56, 0x9b, 0x2a, 0x6e, 0x90, 0xad,
|
||||||
|
0x21, 0x91, 0x86, 0x6d, 0x86, 0xe9, 0xfd, 0xf8, 0xb7, 0x9a, 0x12, 0xcb,
|
||||||
|
0xab, 0x1a, 0xc3, 0xe0, 0x2d, 0xa6, 0xa1, 0x22, 0x43, 0x4e, 0x76, 0x9d,
|
||||||
|
0x75, 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, 0xcd, 0x76, 0x63,
|
||||||
|
0x43, 0xe1, 0xc7, 0x6b, 0x59, 0x34, 0xa4, 0x23, 0x42, 0xc0, 0xb9, 0x98,
|
||||||
|
0x02, 0x00, 0x18, 0xdd, 0x16, 0x00, 0x50, 0xf2, 0x01, 0x01, 0x00, 0x00,
|
||||||
|
0x50, 0xf2, 0x02, 0x01, 0x00, 0x00, 0x50, 0xf2, 0x02, 0x01, 0x00, 0x00,
|
||||||
|
0x50, 0xf2, 0x02,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct eapol_key_data eapol_key_test_21 = {
|
||||||
|
.frame = eapol_key_data_21,
|
||||||
|
.frame_len = sizeof(eapol_key_data_21),
|
||||||
|
.protocol_version = EAPOL_PROTOCOL_VERSION_2001,
|
||||||
|
.packet_len = 119,
|
||||||
|
.descriptor_type = EAPOL_DESCRIPTOR_TYPE_WPA,
|
||||||
|
.key_descriptor_version = EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_MD5_ARC4,
|
||||||
|
.key_type = true,
|
||||||
|
.wpa_key_id = 0,
|
||||||
|
.install = true,
|
||||||
|
.key_ack = true,
|
||||||
|
.key_mic = true,
|
||||||
|
.secure = false,
|
||||||
|
.error = false,
|
||||||
|
.request = false,
|
||||||
|
.encrypted_key_data = false,
|
||||||
|
.smk_message = false,
|
||||||
|
.key_length = 32,
|
||||||
|
.key_replay_counter = 1,
|
||||||
|
.key_nonce = { 0x26, 0x56, 0x9b, 0x2a, 0x6e, 0x90, 0xad, 0x21, 0x91,
|
||||||
|
0x86, 0x6d, 0x86, 0xe9, 0xfd, 0xf8, 0xb7, 0x9a, 0x12,
|
||||||
|
0xcb, 0xab, 0x1a, 0xc3, 0xe0, 0x2d, 0xa6, 0xa1, 0x22,
|
||||||
|
0x43, 0x4e, 0x76, 0x9d, 0x75 },
|
||||||
|
.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 = { 0xcd, 0x76, 0x63, 0x43, 0xe1, 0xc7, 0x6b, 0x59, 0x34,
|
||||||
|
0xa4, 0x23, 0x42, 0xc0, 0xb9, 0x98, 0x02 },
|
||||||
|
.key_data_len = 24,
|
||||||
|
};
|
||||||
|
|
||||||
static void eapol_key_test(const void *data)
|
static void eapol_key_test(const void *data)
|
||||||
{
|
{
|
||||||
const struct eapol_key_data *test = data;
|
const struct eapol_key_data *test = data;
|
||||||
@ -1811,6 +1857,8 @@ int main(int argc, char *argv[])
|
|||||||
eapol_key_test, &eapol_key_test_19);
|
eapol_key_test, &eapol_key_test_19);
|
||||||
l_test_add("/EAPoL Key/Key Frame 20",
|
l_test_add("/EAPoL Key/Key Frame 20",
|
||||||
eapol_key_test, &eapol_key_test_20);
|
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/MIC Test 1",
|
l_test_add("/EAPoL Key/MIC Test 1",
|
||||||
eapol_key_mic_test, &eapol_key_mic_test_1);
|
eapol_key_mic_test, &eapol_key_mic_test_1);
|
||||||
|
Loading…
Reference in New Issue
Block a user