Commit graph

2935 commits

Author SHA1 Message Date
Jouni Malinen b1e1187744 tests: sigma_dut controlled AP with EAP+OSEN
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-19 00:39:42 +03:00
Jouni Malinen 2403edb8fd tests: P2P and avoid frequencies driver event on 5 GHz
This test case verifies that wpa_supplicant is able to perform CSA to a
VHT80 channel when having to move the GO due to an avoid-frequencies
driver event.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-18 20:11:52 +03:00
Jouni Malinen 25bd4e7beb tests: Associated STA indicating 40 MHz intolerant and hostapd deinit
This is a regression test for a forgotten ap_ht2040_timeout() eloop
timer callback on AP interface removal.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-12 21:47:43 +03:00
Jouni Malinen fe102801f6 tests: SAE reauthentication
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-06-06 23:59:46 +03:00
Jouni Malinen ffcaca68d3 tests: FT with different BIP algorithms
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:36 +03:00
Jouni Malinen 2842987879 tests: FILS+FT with SHA384
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:36 +03:00
Jouni Malinen c52626489a tests: Split ap_ft_ap_oom7 into separate test cases
The implementation changes in hostapd FT error path handling in the
follow commit would result in ap_ft_ap_oom7 test case failing. This is
triggered partially by PMF protections and SA Query attempts, so it
looks like it is easier to split each failure case into a separate test
case.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 21:50:01 +03:00
Jouni Malinen 55b3cda775 tests: FT-EAP-SHA384
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-05 20:16:37 +03:00
Jouni Malinen 925584689b tests: ERP enabled on RADIUS server and peer using EAP-TLS v1.3
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-06-01 17:53:10 +03:00
Jouni Malinen 13f69792b0 tests: Update mesh_oom to match implementation change
The initial direct allocation within wpa_supplicant_mesh_init() was
removed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-31 16:14:28 +03:00
Jouni Malinen 5fb016a219 tests: WNM Time Advertisement without time zone configuration
This is a regression test for a segfault in hostapd.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-31 12:55:49 +03:00
Jouni Malinen 64224d5871 tests: Hotspot 2.0 OSEN-single-SSID connection
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-29 23:34:22 +03:00
Jouni Malinen 5e597ed9f0 tests: EAP-pwd with salted passwords
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-28 22:15:20 +03:00
Jouni Malinen b30639b77e tests: Adjust eap_proto_pwd_errors to match implementation changes
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-28 22:09:20 +03:00
Jouni Malinen 62566bc23d tests: WPA2-EAP-FT AP changing from 802.1X-only to FT-only
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-21 22:24:36 +03:00
Jouni Malinen 9a0ae89d62 tests: SAE with Password Identifier
This verifies SAE Password Identifier functionality in both the
infrastructure and mesh BSS cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-19 17:30:29 +03:00
Jouni Malinen 6bf7a54754 tests: Brainpool curves in ap_wpa2_eap_pwd_groups with OpenSSL 1.1.x
The OpenSSL version check should not have been limited to 1.0.2 only.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-17 22:03:25 +03:00
Jouni Malinen 27fa11615b tests: Additional VHT channel switch testing
Enable/disable VHT with CHAN_SWITCH.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-16 01:16:54 +03:00
Jouni Malinen 79467d74fd tests: Fix dbus_tdls_channel_switch with missing kernel support
Check driver capabilities in the D-Bus TDLS case similarly to the
non-D-Bus cases.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-15 00:38:13 +03:00
Jouni Malinen 23c024b9c1 tests: Do not fail if driver supports power saving
Couple of "invalid value" tests started to fail now that mac80211_hwsim
actually accepts power save configuration. Fix these by running the same
command for more code coverage, but in a way that ignores the result of
the operation (succeeds with older kernel versions and fails with
newer).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-04 23:56:32 +03:00
Jouni Malinen f98fdc4e4b tests: wpa_supplicant STATUS output and ieee80211ac=1
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-05-04 20:19:17 +03:00
Jouni Malinen 585e728a5c tests: Skip OCSP tests with wolfSSL
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-02 13:32:51 +03:00
Sean Parkinson f08362e9ce tests: Use same certificates as used for GnuTLS with wolfSSL
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-05-02 00:37:57 +03:00
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 832b736fb2 tests: Add TLS v1.3 into ap_wpa2_eap_tls_versions
When running with OpenSSL 1.1.1, verify that EAP-TLS can be used with
TLS v1.3.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen 1150d0756a tests: Enable TLS v1.3 explicitly in the authentication server
For testing purposes, enable TLS v1.3 in the authentication server so
that the protocol version can be controlled from wpa_supplicant side
more easily.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen 0d34c13a72 tests: Ignore openssl_cipher_suite_config_hapd failure (OpenSSL 1.1.1)
It looks like OpenSSL 1.1.1 accepted the openssl_ciphers=FOO test
configuration or well, at least does not reject it like previous
versions did. For now, ignore this failure.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 22:13:38 +03:00
Jouni Malinen a61ee84d0c tests: Fix ap_wpa2_eap_fast_cipher_suites with OpenSSL 1.1.1
RC4-SHA cipher case ended up allowing the handshake to be started just
to fail with "no ciphers available" when trying to generate ClientHello.
Fix this by handling an EAP failure case for the RC4-SHA test step with
OpenSSL 1.1.*.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-05-01 13:23:25 +03:00
Jouni Malinen edc4374ef5 tests: pending_tc table check for HS 2.0 Terms and Conditions
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-30 20:19:32 +03:00
Jouni Malinen 6444b08cea tests: Hotspot 2.0 Terms and Conditions using SQLite for user DB
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-26 17:56:22 +03:00
Jouni Malinen 045c7c6817 tests: Hotspot 2.0 Terms and Conditions signaling - CoA
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-25 12:57:46 +03:00
Jouni Malinen 0f7fc6b98d tests: Hotspot 2.0 Terms and Conditions signaling
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Jouni Malinen c3d45e130a tests: WDS STA interface events and STA command output
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Jouni Malinen 24b5b786e6 tests: WPA2-PSK/GCMP/CCMP ciphers
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-24 00:35:47 +03:00
Andrei Otcheretianski 440e9f0bbe tests: Async. AP setup failure with wpa_supplicant
Verify that the AP initialization failure is reported back to
wpa_supplicant also when the initialization is complete in a callback.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2018-04-20 00:50:25 +03:00
Jouni Malinen ad5704631a tests: roaming_consortium_selection
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-18 01:12:23 +03:00
Jouni Malinen ce952ebda0 tests: Hotspot 2.0 connection based on roaming_consortiums match
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-17 17:26:56 +03:00
Jouni Malinen 53fa04e197 tests: wpa_supplicant cred roaming_consortiums parsing/writing
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-17 16:40:47 +03:00
Jouni Malinen be5acc3884 tests: Hotspot 2.0 operator icons
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-17 16:40:47 +03:00
Jouni Malinen f75ed521a5 tests: wpa_supplicant secure mesh using sae_password
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-04-13 12:09:33 +03:00
Jouni Malinen e5b0b58bfa tests: DPP and SAE AKMs
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-12 21:14:33 +03:00
Jouni Malinen 3dfccf7c09 tests: sigma_dut DPP/QR initiator as Enrollee (SAE)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-10 21:41:58 +03:00
Jouni Malinen fa617ee6a0 tests: SAE and PSK enabled in wpa_supplicant network profile
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-04-09 19:34:44 +03:00
Jouni Malinen 9a0c472feb tests: Extend hostapd reload config test to cover wmm_enabled behavior
This is a regression test for default behavior for wmm_enabled on the
config reload path.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-04-06 23:32:31 +03:00
Michael Braun d269740a3e tests: FT with CUI
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2018-04-06 19:09:16 +03:00
Michael Braun 473e51762d tests: FT-PSK with VLAN
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2018-04-06 19:01:16 +03:00
Michael Braun e03822913d tests: Add a small sleep in FT run_roams()
time.sleep() in run_roams() is required because the target AP sets the
key once the station was associated. There are races, when the station
processes the (Re)Association Response frame AND the test suite starts
FT_DS before the AP processes its local confirmation and thus
wpa_auth_sm_event(ASSOC_FT). Therefore, the ActionFrame will be lost, as
the AP driver is missing the key.

Since this is this speed is highly synthetic, wait a few milliseconds
before roaming back.

Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2018-04-06 19:01:16 +03:00
Michael Braun 9c50a6d3a3 tests: FT-EAP with VLAN
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
2018-04-06 19:01:16 +03:00
Jouni Malinen 20daa57b92 tests: RESEND_M3 and RESEND_GROUP_M1 with PMF in use
This covers an additional code path that has a bug in IGTK PN clearing.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-04-01 21:42:49 +03:00
Jouni Malinen 5a30fcf573 tests: EAP-ERROR-CODE
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-03-31 12:02:25 +03:00
Jouni Malinen c9aba19bd3 tests: WPA2-Enterprise connection using EAP-PSK after MAC address change
This is a regression test for a sequence where wpa_supplicant interface
MAC address is changed externally and the ifdown-ifup sequence is
processed only after the interface has already been set UP.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-03-30 12:16:49 +03:00
Jouni Malinen 4ae39c121f tests: sigma_dut DPP protocol testing - Stop at TX on Initiator/Enrollee
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-30 10:44:38 +03:00
Jouni Malinen f68caa35e3 tests: GAS/ANQP and Venue URL (hostapd venue_url)
Test the hostapd venue_url configuration parameter. In addition, fix the
previous defined gas_anqp_venue_url test case to use correct encoding of
the Venue URL ANQP-element payload (URLs were missing and Venue Number
was off-by-one).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-26 16:11:54 +03:00
Jouni Malinen bf001e42bf tests: FILS SK using ERP and FT initial mobility domain association
Verify use of KCK2/KEK2 and new FTE MIC calculation with FT-FILS-SHA256.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-26 12:31:04 +03:00
Jouni Malinen 80da433507 tests: Overlapping BSS scan report handling no overlap
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-21 22:15:29 +02:00
Jouni Malinen 0c061630ad tests: DPP Configurator reconfiguration
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-16 20:56:05 +02:00
Jouni Malinen c63e69c379 tests: DPP protocol testing - stop when transmitting Auth Conf
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-03-13 01:04:03 +02:00
Sean Parkinson d8003dcba2 tests: Add support for wolfSSL cryptographic library
Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-03-03 11:52:40 +02:00
Sean Parkinson ff7affcc77 tests: Check PKCS#12 support in additional test cases
These test cases use PKCS#12, so skip them if the build does not include
support for it.

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-03-03 11:52:40 +02:00
Sean Parkinson ead550b9dd tests: Verify MSCHAPV2 support in eap_peap_session_resumption
This test case uses EAP-MSCHAPv2 within the PEAP tunnel, so verify that
the build includes support for that before running the test.

Signed-off-by: Sean Parkinson <sean@wolfssl.com>
2018-03-03 11:52:40 +02:00
Jouni Malinen adc5e37a02 tests: Suite B tests with BoringSSL
Enable appropriate Suite B test cases with BoringSSL. Currently, this
means enabling only the 192-bit level ECDSA and ECDHE-RSA since
BoringSSL has removed support for DHE and there is no need to support
128-bit level ECDSA anymore.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-19 17:38:40 +02:00
Jouni Malinen 007bf37e4b tests: Processing of truncated RSNE fields
Verify that truncated RSN Capabilities field and PMKIDCount field get
ignored.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-19 12:26:26 +02:00
Masashi Honma ede4f68e0a tests: Fix Permission denied on Fedora
On Fedora 26, start.sh fails with these error messages.

Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
Failed to connect to wpa_supplicant global interface: /tmp/wpas-wlan0  error: Permission denied
...

This is because Fedora 26 uses "wheel" group as administrative group.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
2018-02-17 18:56:38 +02:00
Vasyl Vavrychuk 2494bcef24 tests: Add option --dbus for logging D-Bus messages
Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
2018-02-17 18:21:47 +02:00
Vasyl Vavrychuk 2e4707a0a7 tests: Document building of hostapd_cli for hwsim builds
This is used in the tests, too, and was already covered by the build.sh
script, but not this README file.

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
2018-02-17 18:15:31 +02:00
Jouni Malinen 57dc90e386 tests: wpa_supplicant AP mode - open network with client isolation
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-02-17 17:57:45 +02:00
Jouni Malinen e51e49fccc tests: Fix dbus_set_global_properties failure if run twice
Clear the model_name parameter back to the default (empty string) at the
beginning and the end of dbus_set_global_properties to avoid failures if
the test case is run multiple times.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-02-17 17:41:57 +02:00
Jouni Malinen 50d7cdedae tests: Make dbus_p2p_discovery more robust
Ignore any unexpected deviceLost event before the peer devices has been
discovered. This works around issues where the previous test case
terminates before the D-Bus events have been fully delivered. This could
happen, e.g., when running dbus_p2p_discovery twice in a row.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-02-17 17:21:05 +02:00
Jouni Malinen a8ec0b8ccc tests: sigma_dut controlled STA as DPP PKEX responder and error case
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-13 00:24:50 +02:00
Jouni Malinen 8f7a50a63e tests: MAC ACL accept/deny management
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-07 19:45:32 +02:00
Jouni Malinen 27a8d93b07 tests: Make dpp_qr_code_curve_select more robust
Wait for the configuration exchange to complete before issuing the
DPP_STOP_LISTEN command to avoid confusing sequence of operation between
the ongoing and immediately following DPP exchanges.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-07 17:09:20 +02:00
Jouni Malinen 4370ffc0c4 tests: DPP and PKEX on 5 GHz
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-07 16:58:52 +02:00
Jouni Malinen fc031b7ea7 tests: Make owe_transition_mode_multi_bss more robust
Fix bssid2 value to make scanning more reliable for the second OWE BSS.
In addition, reorder the STA status checks to happen before the data
connectivity check to get more accurate failure reason into the log if
the test case fails.

Signed-off-by: Jouni Malinen <j@w1.fi>
2018-02-07 13:45:48 +02:00
Jouni Malinen e129e6bd27 tests: sigma_dut DPP roles incompatible
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-06 22:08:21 +02:00
Jouni Malinen 3e3d634fa7 tests: Enable PMF in sigma_dut DPP tests
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-06 22:08:21 +02:00
Jouni Malinen 2fec710ac5 tests: Use PMF in DPP with legacy PSK/SAE cases
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-06 20:52:44 +02:00
Jouni Malinen 05e5c0e554 tests: Run owe test with PMF required
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-06 18:55:18 +02:00
Jouni Malinen 0dc3c5f2ee tests: WPA2-PSK-FT AP with PSK from a file
Signed-off-by: Jouni Malinen <j@w1.fi>
2018-02-04 12:40:03 +02:00
Adiel Aloni 946ed13c98 tests: Enable device PS before sending PS-Poll
Linux kernel commit c9491367b759 ("mac80211: always update the PM state
of a peer on MGMT / DATA frames") enforces the AP to check only
mgmt/data frames PM bit, and to update station's power save accordingly.
When sending only a PS-Poll (control frame) the AP will ignore the PM
bit. As the result, the partial virtual bitmap will not be updated, and
the test ap_open_disconnect_in_ps will fail on tshark check. Since the
test needs only the TIM to be updated, setting PS enabled will send NDP
that will signal that the station is sleeping. Sending PS-Poll to enable
power save is not correct, according to the following standard
statement: "A PS-Poll frame exchange does not necessarily result in an
Ack frame from the AP, so a non-AP STA cannot change power management
mode using a PS-Poll frame."

Signed-off-by: Adiel Aloni <adiel.aloni@intel.com>
2018-02-04 12:06:11 +02:00
Jouni Malinen 3382224082 tests: SAE with connect command
This does not really work with mac80211_hwsim due to missing offload
support, but at least some minimal extra code coverage can be achieved.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-02-02 20:21:46 +02:00
Jouni Malinen 8f9d2b171f tests: Update DPP PKEX test vector parameters to match new tech spec
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-30 18:28:24 +02:00
Jouni Malinen 2d7aa8d575 tests: Make dpp_pkex_test_vector parameters clearer
This makes it a bit clearer to see which parameters need to be modified
if the test vector needs to be recreated based on new values.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-30 18:21:37 +02:00
Jouni Malinen 35818d3e07 tests: DPP using externally generated bootstrapping keys
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-29 13:23:19 +02:00
Jouni Malinen af0c6e09e6 tests: OWE with PMF required and with open network selection
Verify that PMF can be marked required OWE networks and verify that a
station in transition mode can connect to an open network.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-21 11:13:01 +02:00
Jouni Malinen b70a3fc169 tests: Add the EC root CA private keys to repository
These were forgotten from the initial commit adding the EC PKI.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 22:42:23 +02:00
Jouni Malinen 7fd583d62c tests: Suite B 192-bit RSA validation with 2048-bit client cert
Verify that unexpected 2048-bit RSA client certificate gets rejected by
the RADIUS server if the server is configured to use Suite B at 192-bit
level.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 22:40:55 +02:00
Jouni Malinen 9ec824b9c1 tests: Suite B 192-bit validation with p256 client cert
Verify that unexpected p256 client certificate gets rejected if the
server is configured to use Suite B at 192-bit level.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 20:30:07 +02:00
Jouni Malinen 80ad068001 tests: Update ap_wpa2_eap_assoc_rsn to match implementation change
This covers the new status code for group management cipher mismatch.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 02:08:39 +02:00
Jouni Malinen 6f90cfd780 tests: sigma_dut Suite B tests to not explicitly set PMF
PMF is supposed to be enabled automatically in sigma_dut, so remove
the explicit argument to do so from the commands.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen fe4af86c16 tests: WPA2-PSK AP and association request RSN IE with PMKID
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen 6333cb812b tests: Use longer timeout in sigma_dut_dpp_proto_initiator
This is needed to be ready for a sigma_dut change to wait for an extra
frame RX event.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen 7e526fa735 tests: sigma_dut sta_scan_bss
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen c5238c483f tests: sigma_dut with alternative OWE transition mode configuration
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen 23c45cd0ff tests: sigma_dut and new DPP config index values
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-12 00:50:45 +02:00
Jouni Malinen c8b19de245 tests: DPP QR Code and hostapd as initiator (offchannel)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-08 05:21:49 +02:00
Jouni Malinen 7b498ecafb tests: Enable and require PMF in SAE and OWE test cases with sigma_dut
All SAE and OWE associations are expected to require PMF to be
negotiated, so enable or require PMF in AP and STA configurations
accordingly to match the new sigma_dut behavior.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
2018-01-06 19:52:12 +02:00
Jouni Malinen b4635f0a61 tests: GnuTLS configuration of intermediate CA certificate
GnuTLS seems to require the intermediate CA certificate to be included
both in the ca_cert and client_cert file for the cases of server and
client certificates using different intermediate CA certificates. Use
the user_and_ica.pem file with GnuTLS builds and reorder the
certificates in that file to make this work with GnuTLS.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-29 12:01:22 +02:00
Jouni Malinen 9acd0bebab tests: Enable Suite B test cases with GnuTLS
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 22:33:12 +02:00
Jouni Malinen 0039b972af tests: Speed up suite_b_192_rsa_insufficient_dh in failure case
Check for unexpected connection to avoid timeout on TLS alert event if
the implementation does not check DH key size at all.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 22:33:12 +02:00
Jouni Malinen 2d9ad634c8 tests: Skip eap_tls_pkcs8_pkcs5_v15 with GnuTLS
It looks like this private key format is not supported in GnuTLS (tested
with version 3.4.10).

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 22:33:12 +02:00
Jouni Malinen dc2a3cec66 tests: Fix wpas_config_file with non-mesh and non-SAE builds
Check wpa_supplicant capabilities before testing mesh and SAE
parameters.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 22:33:12 +02:00
Jouni Malinen de5ca36e37 tests: Fix gas_anqp_overrides with non-FILS builds
Need to ignore missing RX-ANQP event for the FILS Realm Info if
wpa_supplicant build does not include FILS support.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 22:33:12 +02:00
Jouni Malinen 6e6651d02e tests: Skip sigma_dut tests for SAE/DPP based on build capabilities
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-28 00:16:53 +02:00
Jouni Malinen adafbe9e2e tests: Opportunistic Wireless Encryption and group negotiation
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-27 21:07:05 +02:00
Jouni Malinen cc15799f6d tests: Mixed mode BSS and MFP-enabled AP rejecting TKIP
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-27 18:39:20 +02:00
Jouni Malinen 5c8df74f18 tests: Mixed SAE and non-SAE network and MFP required with SAE
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-27 18:28:07 +02:00
Jouni Malinen 2d0a04a86c tests: SAE protocol testing - Confirm replay
Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-27 12:19:08 +02:00
Jouni Malinen 8b5a497325 tests: Make dpp_pkex_test_fail and dpp_pkex_alloc_fail more robust
Wait for test/allocation failure for longer than the wait_fail_trigger()
default two seconds to allow DPP (in particular, PKEX) retransmission to
occur. This removes some issues where the previous wait was more or less
exactly the same duration as the retransmission interval and the first
Listen operation not always starting quickly enough to receive the first
frame.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-25 18:36:17 +02:00
leishaoting 481d88c060 tests: Fix "ocsp: Digest must be before -cert or -serial"
When executing ./start.sh with OpenSSL 1.1.0f, an OCSP operation fails.

Put "-sha256" ahead of "-serial" to fix this.

~# openssl version
OpenSSL 1.1.0f  25 May 2017
~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -serial 0xD8D3E3A6CBE3CD12 -no_nonce -sha256
ocsp: Digest must be before -cert or -serial
ocsp: Use -help for summary.
~# openssl ocsp -reqout /lkp/benchmarks/hwsim/tests/hwsim/logs/current/ocsp-req.der -issuer /lkp/benchmarks/hwsim/tests/hwsim/auth_serv/ca.pem -sha256 -serial 0xD8D3E3A6CBE3CD12 -no_nonce

Signed-off-by: leishaoting <leist.fnst@cn.fujitsu.com>
2017-12-24 21:40:21 +02:00
Jouni Malinen 9a3acf43e8 tests: DPP P-521 test vector (mutual auth)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-13 16:25:13 +02:00
Jouni Malinen a1f06d0d90 tests: chan_util_avg_period
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-12 00:48:27 +02:00
Jouni Malinen d39e07f526 tests: OWE and unsupported group using cfg80211 connect command
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-11 14:01:45 +02:00
Jouni Malinen 2ce88a1d2e tests: Suite B 192-bit with RSA and RADIUS
This tests use of RSA >3K keys and forcing ECDHE on both the server and
client side.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-12-10 21:18:06 +02:00
Jouni Malinen 055cd39788 tests: DPP P-256 test vectors
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-07 13:35:19 +02:00
Jouni Malinen 33cddd7fe9 tests: sigma_dut and DPPAuthDirection,Mutual on Initiator
Do not include this argument in normal case, but add a test case to
cover the special extra check case.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-05 21:13:30 +02:00
Jouni Malinen c79b9db066 tests: sigma_dut DPP protocol testing - Stop at RX
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-05 20:22:07 +02:00
Jouni Malinen 1fb0c105a4 tests: WPS with other AES-based ciphers
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-02 12:14:55 +02:00
Jouni Malinen 59642ca956 tests: Make ap_wps_ap_scan_2 work with multiple AES-ciphers
This test case is not really realistic and the second connection attempt
would fail if additional AES-based ciphers get provisioned. Work this
around by dropping to CCMP only if other ciphers are present.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-02 12:14:55 +02:00
Jouni Malinen 70dcb4aa0e tests: Allow more ciphers in ap_wps_mixed_cred
This is needed to avoid false errors with GCMP-256 and CCMP-256 to be
added in the implementation.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-02 12:04:32 +02:00
Jouni Malinen 41dafe0c0a tests: DPP testing to check for mutual authentication on Initiator
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-02 12:00:44 +02:00
Jouni Malinen c30517c6f7 tests: DPP exchange stopping unexpectedly
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-12-02 12:00:44 +02:00
Johannes Berg 702384f77e tests: nl80211.py: Fix attribute padding
The kernel started enforcing attribute lengths, and nl80211.py had been
doing it all wrong - the padding must be present, but not part of the
length.

Fix it to do it the right way.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-12-02 12:00:32 +02:00
Jouni Malinen ce83008c79 tests: sigma_dut and WPS PBC Enrollee
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 23:06:33 +02:00
Jouni Malinen 6923312dc6 tests: sigma_dut controlled connection using preconfigured profile
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 22:54:34 +02:00
Jouni Malinen 5f170c99a4 tests: DPP protocol testing - invalid E-nonce in Conf Req
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 22:03:07 +02:00
Jouni Malinen 087f494140 tests: DPP protocol testing - invalid Transaction ID in Peer Disc Req
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 21:56:55 +02:00
Jouni Malinen edac8087e6 tests: Make dpp_auth_req_retries* more reliable
These test cases were failing when run immediately after
dpp_pkex_test_fail. It looks like timing of the TX status and the short
eloop wait were getting reordered in this cases. This ended up with some
of the DPP-TX-STATUS event messages missing. Instead of explicitly
checking for those message, simply count the number of DPP-TX messages
to verify that the correct number of retries are being sent.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 12:56:24 +02:00
Jouni Malinen 818e3c94b7 tests: DPP/PKEX and local failures
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-30 00:08:40 +02:00
Jouni Malinen e6a6de2994 tests: Generate DPP Config Object for legacy network (PSK)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-29 12:12:31 +02:00
Jouni Malinen 8b4adc38aa tests: sigma_dut DPP AP Configurator using self-configuration
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-27 20:26:33 +02:00
Jouni Malinen 73a7feb311 tests: DPP configurator (AP) signing own connector
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-27 13:24:20 +02:00
Jouni Malinen cdef4e91aa tests: DPP QR Code and mutual authentication with auto-generated key
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-26 17:43:43 +02:00
Janusz Dziedzic b098542cd4 tests: Allow ap_ft for remote tests
Fix problem when running ap_ft test cases with real HW using remote
tests and hwsim wrapper by using the newer hostapd.app_ap() API.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
2017-11-26 13:31:15 +02:00
Jouni Malinen b9e8f920a8 tests: Split ap_vht160 into two test cases (ap_vht160 and ap_vht160b)
These VHT160 with DFS cases were in a single test case to optimize test
execution time with parallel wait for the 60 second CAC. However, this
design has become difficult to support with the kernel changes that
allow radar events to be shared between interfaces. To avoid need for
more workarounds here just for testing purposes, split this into two
test cases so that conflicting events from another interface do not
cause the test case to fail.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-11-26 13:27:25 +02:00
Jouni Malinen 32452fd2aa tests: Split dfs_radar into two test cases (dfs_radar1 and dfs_radar2)
These DFS radar detection cases were in a single test case to optimize
test execution time with parallel wait for the 60 second CAC. However,
this design has become difficult to support with the kernel changes that
allow radar events to be shared between interfaces. To avoid need for
more workarounds here just for testing purposes, split this into two
test cases so that conflicting events from another interface do not
cause the test case to fail.

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-11-26 12:57:27 +02:00
Lubomir Rintel c6ba02154e tests: Enable dynamic debugging for mac80211_hwsim
mac80211_hwsim module typically dumps a lot of details into the kernel
message buffer. While it's probably okay in a dedicated VM, it's way too
chatty in other setups.

The kernel allows fine-tuning logging via the dynamic debugging
facility. Let's enable all logging locations in the mac80211_hwsim
module so that we don't loose debugging output when the kernel adopts
the dynamic debug mechanism for the driver.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2017-11-26 11:47:46 +02:00
Jouni Malinen fb6d648819 tests: ap_ht40_scan to print STATUS and STA information to log
This can be used to check the supported rate information.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-25 13:26:13 +02:00
Jouni Malinen 5da4b2f386 tests: DPP and PKEX (P-256) test vector
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-24 01:43:23 +02:00
Jouni Malinen 9f85f0edd3 tests: Probe Request frame RX events from hostapd
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-23 20:12:34 +02:00
Jouni Malinen 92fe5f567c tests: Fix dpp_auth_req_retries* check for DPP capability
Need to do this before trying to set the DPP test parameters.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-23 20:12:34 +02:00
Jouni Malinen 8968acda9b tests: DPP Auth Req retry behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-23 13:15:40 +02:00
Jouni Malinen fce412d3ef tests: DPP with SAE
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-22 21:24:08 +02:00
Jouni Malinen af872d9d88 tests: DPP protocol testing - invalid I-nonce in Auth Req
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-22 17:34:05 +02:00
Jouni Malinen 169e341e34 tests: DPP and PKEX retry behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-22 15:55:51 +02:00
Jouni Malinen cb6b22325f tests: sigma_dut DPP/QR initiator as Configurator (neg_freq)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-21 01:12:58 +02:00
Jouni Malinen 0e664e0c12 tests: sigma_dut DPP/QR initiator as Configurator or Enrollee
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-21 01:02:37 +02:00
Jouni Malinen 951fc8df34 tests: Double TPK M2 during TDLS setup initiation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-21 00:49:17 +02:00
Jouni Malinen 7b111c04d0 tests: Open AP and STA reassociating back without auth exchange
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-20 21:31:36 +02:00
Jouni Malinen de731ec25c tests: Additional DPP protocol testing for Peer Discovery Req/Resp
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2017-11-19 17:15:48 +02:00
Jouni Malinen 18b8c35b41 tests: Fix ap_cipher_tkip_countermeasures_sta2
hostapd implementation was changed to use a valid Status Code when
rejecting the connection. This test case was forgotten at the time, but
it needs a matching change to allow the new value (1 instead of 14).

Signed-off-by: Jouni Malinen <j@w1.fi>
2017-11-19 16:02:07 +02:00