1# Copyright 2014 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = 'matthewmwang'
6TIME = 'SHORT'
7NAME = 'network_WiFi_RoamFT.mixedEAP'
8TEST_TYPE = 'Server'
9ATTRIBUTES = ('suite:wifi_matfunc')
10DEPENDENCIES = 'wificell'
11
12DOC = """
13This test attempts to verify that we can connect to and roam to and from APs
14that support FT mixed mode for EAP in full view of the DUT. This ensures that
15devices that don't support FT are still compatible with APs that do. Fast BSS
16Transition is part of the 802.11r protocol, which describes a procedure for fast
17roaming from one AP to another within an SSID.
18"""
19
20from autotest_lib.client.common_lib.cros import site_eap_certs
21from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types
22
23def run(machine):
24    # TODO(crbug.com/977722): we shouldn't need different certs. Remove this
25    # once the bug is resolved.
26    ft_eap_config1 = xmlrpc_security_types.WPAEAPConfig(
27        server_ca_cert=site_eap_certs.ca_cert_1,
28        server_cert=site_eap_certs.server_cert_1,
29        server_key=site_eap_certs.server_private_key_1,
30        client_ca_cert=site_eap_certs.ca_cert_1,
31        client_cert=site_eap_certs.client_cert_1,
32        client_key=site_eap_certs.client_private_key_1,
33        wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2,
34        ft_mode=xmlrpc_security_types.WPAConfig.FT_MODE_MIXED)
35    ft_eap_config2 = xmlrpc_security_types.WPAEAPConfig(
36        server_ca_cert=site_eap_certs.ca_cert_2,
37        server_cert=site_eap_certs.server_cert_2,
38        server_key=site_eap_certs.server_private_key_2,
39        client_ca_cert=site_eap_certs.ca_cert_2,
40        client_cert=site_eap_certs.client_cert_2,
41        client_key=site_eap_certs.client_private_key_2,
42        wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA2,
43        ft_mode=xmlrpc_security_types.WPAConfig.FT_MODE_MIXED)
44    host = hosts.create_host(machine)
45    job.run_test('network_WiFi_RoamFT',
46                 tag=NAME.split('.')[1],
47                 host=host,
48                 raw_cmdline_args=args,
49                 additional_params=[ft_eap_config1, ft_eap_config2])
50
51
52parallel_simple(run, machines)
53