Commit graph

62 commits

Author SHA1 Message Date
Sean Parkinson
7d5df79f2d tests: Use a valid key exchange value in eap_proto_ikev2
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-05-02 00:37:38 +03:00
Jouni Malinen
c1361765fd tests: Additional EAP-TTLS error path
This is a regression test for a memory leak on an error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-07-08 16:21:38 +03:00
Jouni Malinen
e4e99927bf tests: Additional LEAP error path
This is a regression test for a memory leak on an error path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-07-08 16:14:03 +03:00
Jouni Malinen
0a0c4dc1d7 tests: Use a domain name in the identity for get_emsk OOM tests
These test cases depend on ERP processing to reach the get_emsk handler
function. Since ERP really needs the realm to derive a proper
keyName-NAI, modify these test cases to pass the realm part in the
identity to allow error checking to be introduced for rejecting ERP
cases where the realm is not available.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-05-22 13:51:07 +03:00
Jouni Malinen
33a6da6908 tests: Work around pyopenssl API change
OpenSSL.SSL.Connection.state_string() was replaced with
get_state_string() in pyopenssl. Add workaround code to be able to use
either of these names.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-03-01 00:20:29 +02:00
Jouni Malinen
db98b58736 tests: Remove trailing whitespace
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-28 14:31:42 +02:00
Jouni Malinen
6219943d57 tests: Fix eap_fast_tlv_nak_oom and eap_fast_proto_phase2
Something broke eap_fast_tlv_nak_oom when moving from Ubuntu 14.04 to
16.04. OpenSSL.SSL.Connection() state_string() returns None in these
cases and the debug log prints for that were causing the case to fail.
For now, work around this by checking whether the state string is None
before trying to print it.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-12-25 00:19:26 +02:00
Jouni Malinen
677c2283e7 tests: Update eap_proto_psk_errors and ap_wpa2_eap_psk_oom
The extension of aes_128_ctr_encrypt() to allow AES-192 and AES-256 to
be used in addition to AES-128 for CTR mode encryption resulted in the
backtrace for the function calls changing. Update the test cases that
started failing due to that change.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-10-10 20:27:31 +03:00
Janusz Dziedzic
5eee514de9 tests: Pass full apdev to add_ap() function (3)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (3) converts the cases that use the start_ap() helper
function.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:46:00 +03:00
Janusz Dziedzic
8b8a1864ff tests: Pass full apdev to add_ap() function (1)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (1) converts the cases where apdev[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2016-04-03 22:45:57 +03:00
Jouni Malinen
bccd22f356 tests: EAP-FAST protocol testing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-20 18:25:13 +02:00
Jouni Malinen
b333f53f6e tests: Fix eap_proto_sake_errors with OpenSSL 1.1.0
The use of the newer OpenSSL API in openssl_hmac_vector() removes one of
the memory allocations, so the TEST_ALLOC_FAIL here could not trigger.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-02-16 15:28:16 +02:00
Jouni Malinen
7dbd2c6c69 tests: EAP Notification errors
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 21:01:06 +02:00
Jouni Malinen
b81e50cddb tests: EAP-Nak special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:43:48 +02:00
Jouni Malinen
3d85fd5a12 tests: EAP-Success/Failure prior to any EAP method
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-07 20:27:13 +02:00
Jouni Malinen
d4af4d275a tests: EAP-TLS protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-02-02 00:24:36 +02:00
Jouni Malinen
fb3db14a6f tests: Fix EAP-SAKE error test case coverage
This was missing the second eap_sake_compute_mic() call in
eap_sake_process_confirm().

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 18:18:25 +02:00
Jouni Malinen
5b0ec907c1 tests: More EAP-MSCHAPv2 error coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 17:42:13 +02:00
Jouni Malinen
1a6f86593b tests: Clean up eap_proto_ikev2
Use helper variable to indicate end of the test case instead of having
to use a fixed length of the loop.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 10:37:04 +02:00
Jouni Malinen
7843ae4456 tests: More EAP-SIM and EAP-AKA local error coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-15 01:15:11 +02:00
Jouni Malinen
7cbc8e6719 tests: fail_test instead of alloc_fail for aes_{encrypt,decrypt}_init
This is needed to fix ap_wpa2_eap_psk_oom, ap_wpa2_eap_sim_oom,
eap_proto_psk_errors, and ap_ft_oom with the new OpenSSL dynamic memory
allocation design.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-14 20:10:16 +02:00
Jouni Malinen
72a4c5ceb6 tests: Additional EAP-pwd error case coverage
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-14 12:12:14 +02:00
Jouni Malinen
6a95f5e2e4 tests: EAP-WSC protocol tests
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 22:03:23 +02:00
Jouni Malinen
dc441c0fc8 tests: EAP protocol tests for canned EAP-Success after identity
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-13 00:17:27 +02:00
Jouni Malinen
2626666ad7 tests: EAP-PAX local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 21:12:59 +02:00
Jouni Malinen
2386bb9776 tests: EAP-OTP local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:21:29 +02:00
Jouni Malinen
491e2d260d tests: EAP-EKE peer OOM in building ID message
The previous attempt at testing this path ended up selecting a different
wpabuf_alloc() call.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-01-06 20:05:11 +02:00
Jouni Malinen
e114e999e0 tests: EAP-LEAP protocol tests (error paths)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-01-04 18:11:28 +02:00
Jouni Malinen
0c8eacd1ab tests: EAP-TNC protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-24 19:16:15 +02:00
Jouni Malinen
2fd377dea1 tests: EAP protocol tests with expanded header
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-21 23:31:15 +02:00
Jouni Malinen
c44e499463 tests: EAP-TTLS local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-20 17:25:41 +02:00
Jouni Malinen
a551da6aae tests: EAP-PEAP local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-19 21:31:17 +02:00
Jouni Malinen
5b7784a89c tests: EAP-FAST local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-12 12:42:44 +02:00
Jouni Malinen
b4e1e99577 tests: EAP-PSK local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 11:13:12 +02:00
Jouni Malinen
4073ef22ae tests: EAP-IKEv2 local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-06 00:39:27 +02:00
Jouni Malinen
850e054c0f tests: EAP-EKE local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-12-01 01:09:28 +02:00
Jouni Malinen
d36ae37679 tests: EAP-SIM/AKA/AKA' error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 20:46:36 +02:00
Jouni Malinen
288b6f8b85 tests: Extended coverage for the EAP-SAKE attribute parser
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 12:25:22 +02:00
Jouni Malinen
ab4ea0e948 tests: EAP-SAKE local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 11:53:31 +02:00
Jouni Malinen
c49b383f45 tests: Convert eap_proto_sake to use newer design
This makes it more convenient to extend the test case with new
message exchanges.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 11:22:21 +02:00
Jouni Malinen
b6f17f2f5c tests: ERP protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-28 00:18:49 +02:00
Jouni Malinen
fe5aa8cb9c tests: EAP-pwd local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-21 18:00:33 +02:00
Jouni Malinen
d5482411cf tests: EAP-MD5 local error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-21 18:00:33 +02:00
Jouni Malinen
8a848fae66 tests: EAP-pwd protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-11-10 18:40:54 +02:00
Jouni Malinen
7c0d66cf7a tests: EAP-MSCHAPv2 error cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-12 01:55:00 +03:00
Jouni Malinen
37211e15fa tests: EAP-MSCHAPv2 protocol tests
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-10-11 00:59:58 +03:00
Jouni Malinen
597516df79 tests: Skip LEAP tests if not included in the build
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 16:52:56 +03:00
Jouni Malinen
c8e82c94da tests: Skip EAP-IKEV2 tests if not included in the build
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 16:52:56 +03:00
Jouni Malinen
e7ac04ceaf tests: Skip EAP-MD5 and EAP-MSCHAPV2 test cases in FIPS mode
These would require MD5 or MD4 which are not allowed in FIPS mode.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-08-02 16:52:56 +03:00
Jouni Malinen
f0174bff85 tests: Fix EAP-SIM/AKA protocol tests to use full header
Couple of the EAP-SIM/AKA protocol test cases were leaving out the
Reserved field. This was not intentional since these test cases were
targeting a specific Subtype processing instead of verifying truncated
header case (which is covered separately). Add the Reserved field to
allow the implementation to add an explicit, earlier check for this.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-05-03 16:32:59 +03:00