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_checkHiddenWEP' 7TIME = 'SHORT' 8TEST_TYPE = 'Server' 9ATTRIBUTES = ('suite:wifi_release') 10DEPENDENCIES = 'wificell' 11 12DOC = """ 13This test case verifies that the DUT can connect to a hidden SSID 14using all variants of 40/104 bit open/shared WEP encryption. 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 get_configurations(): 24 wep40_keys = ['0123456789', '89abcdef01', '9876543210', 'fedcba9876'] 25 wep104_keys = ['0123456789abcdef0123456789', '89abcdef0123456789abcdef01', 26 'fedcba9876543210fedcba9876', '109fedcba987654321fedcba98'] 27 auth_algs = (xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_OPEN, 28 xmlrpc_security_types.WEPConfig.AUTH_ALGORITHM_SHARED) 29 configurations = [] 30 for wep_keys in (wep40_keys, wep104_keys): 31 for auth_alg in auth_algs: 32 wep_config = xmlrpc_security_types.WEPConfig( 33 wep_keys=wep_keys, 34 auth_algorithm=auth_alg) 35 ap_config = hostap_config.HostapConfig( 36 hide_ssid=True, 37 frequency=2412, 38 mode=hostap_config.HostapConfig.MODE_11G, 39 security_config=wep_config) 40 assoc_params = xmlrpc_datatypes.AssociationParameters( 41 is_hidden=True, 42 security_config=wep_config) 43 configurations.append((ap_config, assoc_params)) 44 return configurations 45 46 47def run(machine): 48 host = hosts.create_host(machine) 49 job.run_test('network_WiFi_SimpleConnect', 50 tag=NAME.split('.')[1], 51 host=host, 52 raw_cmdline_args=args, 53 additional_params=get_configurations()) 54 55 56parallel_simple(run, machines) 57