Commit graph

11157 commits

Author SHA1 Message Date
Jouni Malinen
99a9423c7b HS 2.0: Make hs20_build_anqp_req() static
This function is not used outside hs20_supplicant.c.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
1c39f984fd tests: Hotspot 2.0 icon fetch OOM with REQ_HS20_ICON
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-11 21:56:56 +03:00
Jouni Malinen
75b2a87952 HS 2.0: Fix hs20_get_icon() error path
If base64_encode() fails (e.g., due to memory allocation failure), the
return value needs to be checked against NULL before using the (not
really) returned length value. The error path here ended up reading
uninitialized variable.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 19:35:18 +03:00
Jouni Malinen
8e590f02bd tests: Hotspot 2.0 and connect attempt without matching cred
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:54:26 +03:00
Jouni Malinen
6b16e073d3 tests: ANQP no sharing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:50:59 +03:00
Jouni Malinen
c342bb7a3d tests: Hotspot 2.0 and select with multiple matching home credentials
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:43:30 +03:00
Jouni Malinen
c63f2eb973 tests: Hotspot 2.0 connection with TTLS/default
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
26e43f01ae tests: Hotspot 2.0 and connect attempt without RSN
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:24:23 +03:00
Jouni Malinen
99cbec7ea7 tests: Hotspot 2.0 and connect attempt without credential
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:03:28 +03:00
Jouni Malinen
863a6bf6ae tests: Hotspot 2.0 connection and invalid roaming consortium element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 18:00:23 +03:00
Jouni Malinen
63929c763a tests: Hotspot 2.0 connection and 3GPP credential constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
604f559ae4 tests: Hotspot 2.0 and failures during profile configuration
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
af52992a37 tests: Hotspot 2.0 connection and no full match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
0da9869b02 Interworking: Remove unused allow_excluded from interworking_connect()
This argument was set to a hardcoded value 1 and as such, the other
cases were not reachable.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
a7fa20e047 tests: Hotspot 2.0 connection and roaming consortium constraints
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:57 +03:00
Jouni Malinen
416556d06b tests: Hotspot 2.0 network selection with req_conn_capab (not present)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
73ece491c1 tests: D-Bus GetAll wpa_config_get_all() OOM
This is a regression test for a crash on wpa_config_get_all() error
path.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:56 +03:00
Jouni Malinen
8329ad4d06 Fix wpa_config_get_all() error path
The previous version did not really work at all and it ended up crashing
if the os_strdup(field->name) call failed.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-04 17:49:15 +03:00
Jouni Malinen
c8fa30f213 tests: Hotspot 2.0 OSU provider and no AP with info
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
3429e2ff36 tests: GAS/ANQP query OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
60547477e0 tests: ANQP_GET to unknown BSS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
69e85c7fb3 tests: GAS_REQUEST OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1ea75c7ce0 tests: Hotspot 2.0 network selection and invalid GAS response
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
1169516b62 tests: Hotspot 2.0 and maximum BSS load (roaming)
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
a0061cf48f tests: Hotspot 2.0 network selection with min bandwidth - special cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
43e337f70c tests: Hotspot 2.0 required roaming consortium and no match
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
d717c10233 tests: Hotspot 2.0 connection and invalid roaming consortium ANQP-element
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
26597515d5 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
f7c04e50bd Interworking: Combine identical error returns into a single one
There is no need to maintain separate "return -1;" for each of the
wpa_config_set() calls that cannot really fail in practice.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
c8ae9daf2b tests: Fix interworking_select() bssid argument in some test cases
The bssid argument was missing from couple of test cases. While this is
clearly incorrect, it looks like the error did not really cause any
significant issues to the test case. Anyway, better provide the correct
set of arguments to the call.

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
0e67d81fb6 tests: Hotspot 2.0 with simulated SIM and EAP-SIM - invalid IMSI
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
bc6e32880f tests: Remove extra semicolons from python scripts
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
208ebb9d1a tests: Hotspot 2.0 network selection and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
28642616bf tests: Hotspot 2.0 network selection and no roaming consortium
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
e330daa9f1 tests: Hotspot 2.0 network selection and cred_with_nai_realm cred->realm
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
04f4a1f59e tests: Hotspot 2.0 multi-cred and same sp_priority
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:01 +03:00
Jouni Malinen
52be7b4116 tests: wpa_supplicant P2P_LO_START and P2P_LO_STOP commands
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 22:37:00 +03:00
Peng Xu
a6f5b1937a P2P: Allow P2P listen being offloaded to the driver/firmware
This allows P2P Listen to be offloaded to device to enhance power
saving.

To start P2P listen offload, from wpa_cli interface, issue the command:
	p2p_lo_start <freq> <period> <interval> <count>

To stop P2P listen offload, issue the command:
	p2p_lo_stop

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-07-03 22:36:58 +03:00
Peng Xu
35d6655755 nl80211: P2P Listen offload vendor command definitions
Define QCA vendor commands, events, and attributes for P2P
Listen offload.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2016-07-03 19:13:42 +03:00
Roshan Pius
ef60f643ec Do not exceed scan ssid max size advertised by driver
Previously, wpa_set_scan_ssids() fully exhausted
wpa_driver_scan_params.ssid list when hidden network IDs are provided
via the control interface. This results in us exceeding the max size for
the list advertised by the driver when we add the "wildcard" scan SSID
entry. So, ensure that we leave space for one more scan SSID entry in
the list when we exit out of wpa_set_scan_ssids().

Signed-off-by: Roshan Pius <rpius@google.com>
2016-07-03 19:13:42 +03:00
Jouni Malinen
1c96988bc2 tests: IBSS and key_mgmt field in STATUS
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:42 +03:00
Saurav Babu
4ac5f2f8f4 Add text name for WPA_KEY_MGMT_WPA_NONE key_mgmt value
This will output WPA-NONE for WPA_KEY_MGMT_WPA_NONE key_mgmt value in
STATUS command.

Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
2016-07-03 19:13:41 +03:00
Jouni Malinen
50717e1e32 tests: IBSS operating frequency reporting
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Saurav Babu
f0e84057fb nl80211: Provide frequency in EVENT_ASSOC when IBSS is joined
Provides operating frequency in EVENT_ASSOC when IBSS is joined so that
wpa_s->assoc_freq can be updated when any IBSS network is joined.

Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
2016-07-03 19:13:41 +03:00
Jouni Malinen
a8fd58aa42 tests: MBO and supported operating classes
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-03 19:13:41 +03:00
Jouni Malinen
653d227e9f MBO: Improve supported operating class generation
Previously, 2.4 GHz operating class 81 was not added for US due to not
all of the channels (1-13 in this operating class) being supported.
Still, this operating class is the main operating class in the global
table for 2.4 GHz and it is the only option for indicating support for
the 2.4 GHz band channels in US.

Change the supported operating class building rules to include all
operating classes for which at least one channel is enabled. In
addition, fix the 80, 80+80, and 160 MHz channel checks (checking the
center frequency channel was failing since it is not a valid 20 MHz
channel).

Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-01 01:13:54 +03:00
Jouni Malinen
b47a743942 tests: MBO BSS transition request MBO IE parsing
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-07-01 01:13:54 +03:00
Jouni Malinen
0073f453ff tests: MBO failure cases
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
3e3f1602b5 tests: MBO WNM token wrap around
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 12:53:05 +03:00
Jouni Malinen
bbd41e4d2b tests: Invalid MBO non_pref_chan values
Signed-off-by: Jouni Malinen <j@w1.fi>
2016-06-30 01:13:16 +03:00