3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 23:09:34 +01:00
Commit Graph

334 Commits

Author SHA1 Message Date
James Prestwood
999879c9b8 unit: add band tests for 6GHz
Tests that all valid channels/frequencies can be computed as well
as oci_verify maps each new operating class to the correct chandef.
2022-02-25 13:11:00 -06:00
James Prestwood
d6b2a3af50 unit: add DPP unit tests for URI parsing 2022-02-22 16:24:26 -06:00
James Prestwood
1ebbb1a11e unit: add checksum/random check for test-dpp 2022-01-10 17:19:29 -06:00
James Prestwood
b007909c0d unit: add checks for improper use of json_iter_parse/next
This adds checks to make sure these API's don't operate on
objects/primitives they aren't supposed to.
2022-01-06 16:43:18 -06:00
James Prestwood
380896d08a unit: add strings to several json iteration tests 2022-01-06 16:43:18 -06:00
James Prestwood
f3e2147e72 unit: add test for nested arrays 2022-01-06 16:11:35 -06:00
James Prestwood
e38dcbbdbf unit: add arrays of objects test 2022-01-06 16:11:31 -06:00
James Prestwood
01ea05d650 unit: add test for json arrays 2022-01-06 15:16:16 -06:00
James Prestwood
e321c48211 unit: add primitive json test 2022-01-06 14:10:26 -06:00
James Prestwood
385dd2d469 unit: add larger object test
This tests the previous JSON bug fix removing % sizeof(jsmntok_t)
Objects with more than 10 (sizeof(jsmntok_t)) would not parse
correctly.
2021-12-10 18:07:27 -06:00
James Prestwood
e04c363d9f unit: add JSON unit test 2021-12-10 17:33:47 -06:00
James Prestwood
0822b942af unit: fix memory leaks in test-dpp 2021-12-06 18:45:13 -06:00
James Prestwood
43037a94cf unit: add unit test for DPP crypto operations 2021-12-06 16:36:15 -06:00
Denis Kenzior
6a477061c7 unit: Consistently use network-byte-order
Commit ed10b00afa ("unit: Fix eapol IP Allocation test failure")
did not convert all instances of IP allocation settings to network byte
order.

Fixes: 5c9de0cf23 ("eapol: Store IP address in network byte order")
2021-10-25 10:39:00 -05:00
James Prestwood
ec2c060b75 unit: update tests with new TK install arguments 2021-10-08 13:27:00 -05:00
James Prestwood
0f3b2ae180 unit: update test-eapol with GTK API change 2021-09-28 17:26:10 -05:00
Denis Kenzior
9a080dffcd unit: Add additional OCI tests 2021-09-23 14:27:41 -05:00
Denis Kenzior
764376b677 unit: Add OCI verification test 2021-09-21 15:34:40 -05:00
Denis Kenzior
5760e300c3 unit: Add tests for channel to frequency conversion 2021-09-21 15:34:40 -05:00
Denis Kenzior
ed10b00afa unit: Fix eapol IP Allocation test failure
This test was failing due to a change introduced in commit
5c9de0cf23 which changed handshake state storage of IPs from host
order to network byte order.  Update the test to set IPs in network
byte-order.

Fixes: 5c9de0cf23 ("eapol: Store IP address in network byte order")
2021-08-23 08:56:07 -05:00
Denis Kenzior
b55732066d unit: Add simple ie sorting test 2021-08-04 10:46:27 -05:00
Denis Kenzior
64211c292d unit: Fix SAE unit test failure
The SAE unit test was written when group 19 was preferred by default for
all SAE connections.  However, we have now started to prefer higher
security groups.  Trick the test into using group 19 by wrapping
l_ecc_supported_ike_groups implementation to return just curve 19 as a
supported curve.
2021-07-27 14:01:12 -05:00
Denis Kenzior
e82f0d3459 unit: Update expected error code 2021-07-14 09:58:42 -05:00
Denis Kenzior
08845fb19c ie: Change ie_tlv_builder_finalize signature
ie_tlv_builder_init takes a size_t as input, yet for some reason
ie_tlv_builder_finalize takes an unsigned int argument as output.  Fix
the latter to use size_t as well.
2021-07-14 09:58:42 -05:00
Denis Kenzior
0815b85f22 unit: Add basic test for ECC PWE-from-PT derivation 2021-07-14 09:58:42 -05:00
Denis Kenzior
3f1e4cce65 unit: Add basic test for crypto_derive_sae_pt_ecc 2021-07-07 21:03:32 -05:00
Denis Kenzior
b63674dc21 unit: Update to ell ecc API changes 2021-07-07 20:57:09 -05:00
Denis Kenzior
e4d007e14f unit: Add test for SAE Hash to Curve derivation 2021-07-05 18:38:23 -05:00
Denis Kenzior
e7529fc7de unit: Use inet_ntop instead of inet_ntoa 2021-06-04 14:00:27 -05:00
Denis Kenzior
297cde85bc unit: Remove test case
This has been superceded by tests in unit/test-band.c
2021-06-04 10:14:04 -05:00
Denis Kenzior
6111706911 unit: Add unit test for non-HT data rate estimate 2021-06-04 10:14:04 -05:00
Denis Kenzior
3450bca695 unit: Add unit test for HT RX data rate estimation 2021-06-04 10:14:04 -05:00
Denis Kenzior
2686baae69 unit: Add unit test for VHT RX data rate estimation 2021-06-04 10:14:04 -05:00
James Prestwood
2ecf5ff0d7 unit: update test-ie with supported rates
For now this just tests supported rates with a zero length
IE.
2021-05-14 14:28:23 -05:00
James Prestwood
5b4a7fc377 unit: remove timeout tests from test-sae
The timeout functionality was removed from the core SAE
implementation as it causes issues with kernel behavior.
Because of this the timeout tests are no longer valid,
nor is a few asserts in the end-to-end test.
2021-04-06 15:03:35 -05:00
Denis Kenzior
c2104b62a9 unit: Drop eapol_sm_free calls
WSC EAP method always results in failure, even if successful.  Failed
eapol_sm sessions are auto-cleaned, so there's no need to do this
explicitly.  Also eapol_exit() will clean up any left-over sessions, so
drop this to make the code a bit simpler.
2021-02-10 15:41:37 -06:00
Denis Kenzior
8232fbddbf unit: Drop un-needed null checks
both ap_sm and sta_sm are passed to eapol_register and
eapol_start.  No need to check for null here
2021-02-09 10:42:03 -06:00
James Prestwood
e009f6298a unit: test-sae: zero out frame buffers
Not all the authenticate frame elements are set and were assumed
to be zero. Since alloca does not memset data it needs to be
done explicitly.
2021-02-08 16:25:07 -06:00
Denis Kenzior
8139b6bad7 unit: Drop un-needed null checks
both ap_sm and sta_sm are passed to eapol_register and eapol_start.  No
need to check for null here
2021-02-08 14:12:12 -06:00
James Prestwood
f769d8f1b3 unit: add test for util_ip_prefix_tohl 2020-10-26 16:17:13 -05:00
Andrew Zaborowski
8e9a2fe05d treewide: Use l_settings_{set,get}_bytes 2020-09-16 16:46:02 -05:00
Andrew Zaborowski
3e1a0539f5 unit: Add two EAPOL IP allocation scenarios 2020-09-14 11:45:27 -05:00
Andrew Zaborowski
7a91f6dba4 unit: Add a WSC-R PBC test with Open auth_type 2020-08-25 16:49:02 -05:00
Andrew Zaborowski
3aafb80b54 unit: Add a WSC-R test with a raw PSK
The wsc credentials can contain the passphrase or the raw PSK bytes,
now test both scenarios.
2020-08-25 16:48:30 -05:00
Andrew Zaborowski
3cf8af2431 unit: Test a EAP-WSC-R setup with WPA2 credentials 2020-08-25 16:47:50 -05:00
Andrew Zaborowski
6f9b087304 unit: Fix a typo in test-eapol 2020-08-25 16:47:36 -05:00
Andrew Zaborowski
5140c005c1 unit: Authenticator 4-way handshake error scenario 2020-08-17 09:53:14 -05:00
Andrew Zaborowski
5dd7f5a0fe unit: Add an authenticator-side 4-Way Handshake test
Test the eapol.c code responsible for the access point mode 4-way
handshake with correct IEs and PSK on both sides (success scenario).
2020-08-17 09:51:50 -05:00
Ard Biesheuvel
1db8a85a60 crypto: incorporate C implementation of ARC4
Incorporate the LGPL v2.1 licensed implementation of ARC4, taken from
the Nettle project (https://git.lysator.liu.se/nettle/nettle.git,
commit 3e7a480a1e351884), and tweak it a bit so we don't have to
operate on a skip buffer to fast forward the stream cipher, but can
simply invoke it with NULL dst or src arguments to achieve the same.

This removes the dependency [via libell] on the OS's implementation of
ecb(arc4), which may be going away, and which is not usually accelerated
in the first place.
2020-08-03 16:28:24 -05:00
Denis Kenzior
45824ff7eb unit: Update to the new handshake API 2020-04-02 00:41:18 -05:00