mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-24 06:52:37 +01:00
unit: Add test case #2 for RSNE parser
This commit is contained in:
parent
693260befe
commit
a01ecd64fa
@ -290,6 +290,20 @@ static const struct ie_rsne_info_test ie_rsne_info_test_1 = {
|
||||
.akm_suites = IE_RSN_AKM_SUITE_PSK,
|
||||
};
|
||||
|
||||
/* 802.11, Section 8.4.2.27.1; first example */
|
||||
static const unsigned char rsne_data_2[] = {
|
||||
0x30, 0x14, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x04, 0x01, 0x00, 0x00, 0x0f,
|
||||
0xac, 0x04, 0x01, 0x00, 0x00, 0x0f, 0xac, 0x01, 0x00, 0x00,
|
||||
};
|
||||
|
||||
static const struct ie_rsne_info_test ie_rsne_info_test_2 = {
|
||||
.data = rsne_data_2,
|
||||
.data_len = sizeof(rsne_data_2),
|
||||
.group_cipher = IE_RSN_CIPHER_SUITE_CCMP,
|
||||
.pairwise_ciphers = IE_RSN_CIPHER_SUITE_CCMP,
|
||||
.akm_suites = IE_RSN_AKM_SUITE_8021X,
|
||||
};
|
||||
|
||||
static void ie_test_rsne_info(const void *data)
|
||||
{
|
||||
const struct ie_rsne_info_test *test = data;
|
||||
@ -317,6 +331,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
l_test_add("/ie/RSN Info Parser/Test Case 1",
|
||||
ie_test_rsne_info, &ie_rsne_info_test_1);
|
||||
l_test_add("/ie/RSN Info Parser/Test Case 2",
|
||||
ie_test_rsne_info, &ie_rsne_info_test_2);
|
||||
|
||||
return l_test_run();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user