1# Copyright (c) 2013 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 = 'wiley, pstew, quiche' 6NAME = 'network_WiFi_SimpleConnect.wifi_checkRawPMK' 7TIME = 'SHORT' 8TEST_TYPE = 'Server' 9ATTRIBUTES = ('suite:wifi_release') 10DEPENDENCIES = 'wificell' 11 12DOC = """ 13This test verifies that DUT can connect to a WPA network using 14a raw PMK value instead of an ASCII passphrase. 15""" 16 17 18from autotest_lib.client.common_lib.cros.network import xmlrpc_datatypes 19from autotest_lib.client.common_lib.cros.network import xmlrpc_security_types 20from autotest_lib.server.cros.network import hostap_config 21 22 23def run(machine): 24 wpa_config = xmlrpc_security_types.WPAConfig( 25 psk='0123456789abcdef' * 4, 26 wpa_mode=xmlrpc_security_types.WPAConfig.MODE_PURE_WPA, 27 wpa_ciphers=[xmlrpc_security_types.WPAConfig.CIPHER_TKIP]) 28 ap_config = hostap_config.HostapConfig( 29 channel=1, 30 mode=hostap_config.HostapConfig.MODE_11G, 31 security_config=wpa_config) 32 client_config = xmlrpc_datatypes.AssociationParameters( 33 security_config=wpa_config) 34 host = hosts.create_host(machine) 35 job.run_test('network_WiFi_SimpleConnect', 36 tag=NAME.split('.')[1], 37 host=host, 38 raw_cmdline_args=args, 39 additional_params=[(ap_config, client_config)]) 40 41 42parallel_simple(run, machines) 43