mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 14:49:24 +01:00
unit: Add rsc field to unit test
This commit is contained in:
parent
7cf4f7b100
commit
eded7b04c4
@ -51,6 +51,7 @@ struct eapol_key_data {
|
|||||||
uint8_t key_replay_counter[8];
|
uint8_t key_replay_counter[8];
|
||||||
uint8_t key_nonce[32];
|
uint8_t key_nonce[32];
|
||||||
uint8_t eapol_key_iv[16];
|
uint8_t eapol_key_iv[16];
|
||||||
|
uint8_t key_rsc[8];
|
||||||
uint8_t key_mic_data[16];
|
uint8_t key_mic_data[16];
|
||||||
uint16_t key_data_len;
|
uint16_t key_data_len;
|
||||||
};
|
};
|
||||||
@ -92,6 +93,7 @@ static struct eapol_key_data eapol_key_test_1 = {
|
|||||||
0xf4, 0xd7, 0x6f, 0x2b, 0xf7 },
|
0xf4, 0xd7, 0x6f, 0x2b, 0xf7 },
|
||||||
.eapol_key_iv = { 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 },
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||||
|
.key_rsc = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||||
.key_mic_data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
.key_mic_data = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
|
||||||
.key_data_len = 0,
|
.key_data_len = 0,
|
||||||
@ -127,6 +129,8 @@ static void eapol_key_test(const void *data)
|
|||||||
sizeof(packet->eapol_key_iv)));
|
sizeof(packet->eapol_key_iv)));
|
||||||
assert(!memcmp(packet->key_mic_data, test->key_mic_data,
|
assert(!memcmp(packet->key_mic_data, test->key_mic_data,
|
||||||
sizeof(packet->key_mic_data)));
|
sizeof(packet->key_mic_data)));
|
||||||
|
assert(!memcmp(packet->key_rsc, test->key_rsc,
|
||||||
|
sizeof(packet->key_rsc)));
|
||||||
assert(L_BE16_TO_CPU(packet->key_data_len) == test->key_data_len);
|
assert(L_BE16_TO_CPU(packet->key_data_len) == test->key_data_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user