From f8c5e4d93b6eb999f9c023b66a905e718fc7ca00 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 24 Dec 2014 15:21:48 -0600 Subject: [PATCH] unit: Add another EAPoL test frame This one is 2 of 4 --- unit/test-eapol.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/unit/test-eapol.c b/unit/test-eapol.c index 897e05d4..86f2194e 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -187,6 +187,51 @@ static struct eapol_key_data eapol_key_test_3 = { .key_data_len = 0, }; +static const unsigned char eapol_key_data_4[] = { + 0x01, 0x03, 0x00, 0x75, 0x02, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x89, 0xe9, 0x15, 0x65, 0x09, 0x4f, + 0x32, 0x9a, 0x9c, 0xd5, 0x4a, 0x4a, 0x09, 0x0d, 0x2c, 0xf4, 0x34, 0x46, + 0x83, 0xbf, 0x50, 0xef, 0xee, 0x36, 0x08, 0xb6, 0x48, 0x56, 0x80, 0x0e, + 0x84, 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, 0x01, 0xc3, 0x1b, + 0x82, 0xff, 0x62, 0xa3, 0x79, 0xb0, 0x8d, 0xd1, 0xfc, 0x82, 0xc2, 0xf7, + 0x68, 0x00, 0x16, 0x30, 0x14, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x04, 0x01, + 0x00, 0x00, 0x0f, 0xac, 0x04, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x02, 0x00, + 0x00 +}; + +static struct eapol_key_data eapol_key_test_4 = { + .frame = eapol_key_data_4, + .frame_len = sizeof(eapol_key_data_4), + .protocol_version = EAPOL_PROTOCOL_VERSION_2001, + .packet_len = 117, + .descriptor_type = EAPOL_DESCRIPTOR_TYPE_80211, + .key_descriptor_version = EAPOL_KEY_DESCRIPTOR_VERSION_HMAC_SHA1_AES, + .key_type = true, + .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 = + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, + .key_nonce = { 0x32, 0x89, 0xe9, 0x15, 0x65, 0x09, 0x4f, 0x32, 0x9a, + 0x9c, 0xd5, 0x4a, 0x4a, 0x09, 0x0d, 0x2c, 0xf4, 0x34, + 0x46, 0x83, 0xbf, 0x50, 0xef, 0xee, 0x36, 0x08, 0xb6, + 0x48, 0x56, 0x80, 0x0e, 0x84, }, + .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 = { 0x01, 0xc3, 0x1b, 0x82, 0xff, 0x62, 0xa3, 0x79, 0xb0, + 0x8d, 0xd1, 0xfc, 0x82, 0xc2, 0xf7, 0x68 }, + .key_data_len = 22, +}; + static void eapol_key_test(const void *data) { const struct eapol_key_data *test = data; @@ -234,6 +279,8 @@ int main(int argc, char *argv[]) eapol_key_test, &eapol_key_test_2); l_test_add("/EAPoL Key/Key Frame 3", eapol_key_test, &eapol_key_test_3); + l_test_add("/EAPoL Key/Key Frame 4", + eapol_key_test, &eapol_key_test_4); return l_test_run(); }