3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00
Commit Graph

242 Commits

Author SHA1 Message Date
Denis Kenzior
6bf7e638b0 unit: Fix asan warning
==24642==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe00450850 at pc 0x7f2043eef5e3 bp 0x7ffe00450660 sp 0x7ffe0044fdf0
WRITE of size 3 at 0x7ffe00450850 thread T0
    #0 0x7f2043eef5e2 in __interceptor_vsprintf /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1522
    #1 0x7f2043eef956 in __interceptor_sprintf /var/tmp/portage/sys-devel/gcc-8.2.0-r2/work/gcc-8.2.0/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1553
    #2 0x4026f1 in prf_test unit/test-prf-sha1.c:64
    #3 0x407478 in l_test_run ell/test.c:83
    #4 0x4029e3 in main unit/test-prf-sha1.c:130
    #5 0x7f2042dd9ed9 in __libc_start_main (/lib64/libc.so.6+0x20ed9)
    #6 0x401f79 in _start (/home/denkenz/iwd-master/unit/test-prf-sha1+0x401f79)
2019-01-11 11:34:49 -06:00
Tim Kourt
58f7b06c01 unit: Switch eap-mschapv2 test to use mschaputil 2019-01-10 17:04:57 -06:00
Denis Kenzior
9b722197ba ecc: Remove remaining ECC/ECDH files
ECC primitives have now been fully converted / moved to ell.
2019-01-10 16:27:09 -06:00
James Prestwood
e5cf66ddb2 unit: fix test-sae to use a valid peer point
Now that the peer element is validated we must send valid point data.
This should have been done in the beginning anyways, but since the
point data was not previously validated this test still passed.

Since this particular unit test is really testing timeouts we can just
use the commit buffer for other tests since it contains a valid scalar
and point.
2019-01-10 16:26:29 -06:00
Andrew Zaborowski
1578a37ac2 unit: Call the new l_tls_start in eap-tls test 2018-12-19 10:05:38 -06:00
James Prestwood
c2094c5e04 ecdh: remove ECDH and unit tests
ECDH was moved into ell and is no longer needed in IWD
2018-12-12 11:12:27 -06:00
James Prestwood
007d972046 unit: allow ECDH test vector to run without l_getrandom
Using the gcc wrap feature, l_getrandom was redefined to use a known
good, hardcoded random value. The two other tests were also disabled
if l_getrandom is not supported since these do require randomness
for proper testing.
2018-11-20 17:28:44 -06:00
James Prestwood
44c4074c35 unit: add ECDH test vector
RFC 5114 defines a test vector for each ECP group. These values were
hard coded into a new ECDH unit test.
2018-11-19 13:46:34 -06:00
Andrew Zaborowski
8c333a585a unit: Update for l_tls API changes 2018-11-19 13:04:30 -06:00
James Prestwood
dddbf22ab7 unit: added ECDH unit tests 2018-11-16 16:25:20 -06:00
Marcel Holtmann
16824cad05 unit: Use L_ARRAY_SIZE instead own version of it 2018-11-09 14:49:33 +01:00
Tim Kourt
f369c9006e unit: use new setting key name for EAP-MD5 2018-10-29 18:46:07 -05:00
Tim Kourt
949e672b75 unit: Fix TTLS test
Single AVP should not be padded with zeros as padding is only
used to separate AVPs in a sequence.

RFC 5281 Section 10.2.  AVP Sequences

   Data encapsulated within the TLS record layer must consist entirely
   of a sequence of zero or more AVPs.  Each AVP must begin on a four-
   octet boundary relative to the first AVP in the sequence.  If an AVP
   is not a multiple of four octets, it must be padded with zeros to the
   next four-octet boundary.

   Note that the AVP Length does not include the padding.
2018-10-19 10:00:10 -05:00
Marcel Holtmann
8f8a214fbd build: Use new l_tls_prf_get_bytes and remove ell/tls-private.h usage 2018-10-19 09:30:59 +02:00
Marcel Holtmann
467d3958b4 build: Use l_tls_prf_get_bytes instead of tls_prf_get_bytes 2018-10-19 08:46:57 +02:00
Marcel Holtmann
b27edce298 build: Use include "" instead of include <> for ell/tls-private.h 2018-10-19 08:24:57 +02:00
Denis Kenzior
d22e57c994 treewide: Remove use of key-private.h 2018-10-19 00:31:41 -05:00
Andrew Zaborowski
6405f487c6 unit: Update handshake_state WPA/RSN IE setter names 2018-08-27 11:46:38 -05:00
James Prestwood
700b7de175 unit: check random support on test-sae 2018-08-23 14:55:10 -05:00
James Prestwood
801188885c unit: updated test-sae to use le API's following sae.c 2018-08-23 12:24:06 -05:00
James Prestwood
41d35e561a unit: fix buffer overrun in SAE test 2018-08-15 15:54:18 -05:00
James Prestwood
26246e75c8 unit: tests for SAE 2018-08-15 13:26:58 -05:00
Denis Kenzior
db378dd2e8 unit: Fix compilation warning
Some compilers complained that:

../unit/test-ecc.c: In function ‘run_test’:
../unit/test-ecc.c:295:38: warning: ‘lres’ may be used uninitialized in
	this function [-Wmaybe-uninitialized]

assert(data->lres == lres);
                     ^
2018-08-10 14:46:03 -05:00
James Prestwood
c629d71427 unit: updated eapol test to reflect API changes
verify/calculate_mic and key decryption API's now take the AKM suite
2018-08-09 15:06:44 -05:00
James Prestwood
99d1e0595e unit: added test for vli_legendre 2018-08-08 16:06:29 -05:00
Denis Kenzior
412a03f236 unit: drop unit tests for removed functions 2018-07-30 08:59:55 -05:00
Tim Kourt
243a574d75 unit: add client token finder test 2018-07-25 11:47:49 -05:00
Denis Kenzior
41361053b3 unit: Print tls_alert 2018-06-28 13:23:29 -05:00
Denis Kenzior
5446389d32 unit: Store handshake_failed in test_handshake_state
Instead of using a global variable
2018-06-27 17:01:22 -05:00
James Prestwood
5d31fc25d7 unit: updated unit test with eapol deauth removal 2018-06-27 16:45:53 -05:00
Denis Kenzior
7c0bc22b7c unit: Update to the new API 2018-06-21 20:10:07 -05:00
Denis Kenzior
180a893c0c unit: Update to the new EAP API 2018-06-14 20:01:22 -05:00
Tim Kourt
c23849adf6 unit: add include for the changed public func 2018-05-31 19:39:42 -05:00
Denis Kenzior
5616962bb2 unit: Update scan_get_security usage to new API 2018-05-24 19:22:16 -05:00
James Prestwood
d810e7ab45 unit: updated ecc unit tests to use byte conversion 2018-05-04 19:33:55 -05:00
James Prestwood
49d313ab68 unit: Add ECC math sanity tests 2018-05-03 10:48:46 -05:00
Denis Kenzior
736db5c27c unit: update to the new API 2018-05-01 16:19:38 -05:00
Tim Kourt
7501d9372b unit: network args parser validation 2018-03-28 14:33:00 -05:00
Andrew Zaborowski
b1356680b7 unit: Update handshake_state_set_pmk parameters 2018-03-15 11:40:17 -05:00
Denis Kenzior
973b7b4555 unit: Additional support checks for WSC tests 2018-01-24 11:07:36 -06:00
Denis Kenzior
9e0d11f948 unit: pin generation test depends on getrandom
Turn this test off if the kernel doesn't have it
2018-01-24 09:17:00 -06:00
Denis Kenzior
f91380c195 unit: Skip EAPoL tests when kernel features are missing 2018-01-23 15:50:35 -06:00
Denis Kenzior
b64efb83bc unit: Don't run WSC tests if kernel features missing
WSC uses Diffie-Hellman and AES-CBC, so don't bother running the tests
that need these in case the feature is not present in the kernel.
2018-01-23 15:50:32 -06:00
Denis Kenzior
a1f4a9901d unit: Add EAPoL retransmission test 2017-10-19 16:47:35 -05:00
Andrew Zaborowski
525ecbb113 unit: Remove pbkdf2_sha1 tests
They can now be moved to ELL.
2017-10-09 14:34:31 -05:00
Andrew Zaborowski
47ae1c2f06 unit: Add IE order tests in test-mpdu 2017-09-22 12:15:37 -05:00
Andrew Zaborowski
786b93ffc4 unit: Add Extended Element ID tests in test-ie 2017-09-22 12:00:15 -05:00
Andrew Zaborowski
fd661d5e9f unit: Use new mpdu.h structs 2017-08-31 15:13:31 -05:00
Denis Kenzior
da029bead8 unit: Use overlapped in/out buffers
Since aes_wrap & aes_unwrap advertise support for overlapped in/out
buffers, make sure that the unit test actually tests this as well.
valgrind will complain if the memory is overlapped and memcpy is used
instead of memmove.
2017-08-31 13:16:28 -05:00
Denis Kenzior
9da2d64980 unit: Add check that AES is present 2017-08-31 13:15:15 -05:00