blob: 79c4065dba58774cad6d9246d3469cd62adb2b96 [file] [log] [blame]
tturney1bdf77d2015-12-28 17:46:13 -08001#!/usr/bin/env python3.4
Ang Li73697b32015-12-03 00:41:53 +00002#
tturney1bdf77d2015-12-28 17:46:13 -08003# Copyright 2016 - The Android Open Source Project
Ang Li73697b32015-12-03 00:41:53 +00004#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import pprint
Ang Li8e767182015-12-09 17:29:24 -080018import random
Ang Li73697b32015-12-03 00:41:53 +000019import time
20
Ang Lic2d45212016-03-10 18:38:53 -080021from acts import asserts
Ang Li82522812016-06-02 13:57:21 -070022from acts import signals
Girish Moturu03a2e4d2017-06-12 10:46:51 +053023from acts.test_decorators import test_tracker_info
Girish Moturuf1ce4202018-10-20 21:33:00 -070024from acts.test_utils.net.net_test_utils import start_tcpdump
25from acts.test_utils.net.net_test_utils import stop_tcpdump
Ang Li82522812016-06-02 13:57:21 -070026from acts.test_utils.wifi import wifi_test_utils as wutils
Girish Moturuf1ce4202018-10-20 21:33:00 -070027from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
Ang Lic2d45212016-03-10 18:38:53 -080028
Ang Lie8ed2b32015-12-11 12:30:20 -080029WifiEnums = wutils.WifiEnums
Ang Li73697b32015-12-03 00:41:53 +000030
31# EAP Macros
32EAP = WifiEnums.Eap
33EapPhase2 = WifiEnums.EapPhase2
Ang Li73697b32015-12-03 00:41:53 +000034# Enterprise Config Macros
35Ent = WifiEnums.Enterprise
Ang Li73697b32015-12-03 00:41:53 +000036
Ang Li73697b32015-12-03 00:41:53 +000037
Girish Moturuf1ce4202018-10-20 21:33:00 -070038class WifiEnterpriseTest(WifiBaseTest):
Ang Li73697b32015-12-03 00:41:53 +000039 def __init__(self, controllers):
Girish Moturuf1ce4202018-10-20 21:33:00 -070040 WifiBaseTest.__init__(self, controllers)
Ang Li73697b32015-12-03 00:41:53 +000041
42 def setup_class(self):
43 self.dut = self.android_devices[0]
Ang Li8e767182015-12-09 17:29:24 -080044 wutils.wifi_test_device_init(self.dut)
Ang Li81549052016-06-09 18:51:14 -070045 # If running in a setup with attenuators, set attenuation on all
46 # channels to zero.
47 if getattr(self, "attenuators", []):
48 for a in self.attenuators:
49 a.set_atten(0)
Ang Li73697b32015-12-03 00:41:53 +000050 required_userparam_names = (
Ang Li81549052016-06-09 18:51:14 -070051 "ca_cert", "client_cert", "client_key", "passpoint_ca_cert",
52 "passpoint_client_cert", "passpoint_client_key", "eap_identity",
53 "eap_password", "invalid_ca_cert", "invalid_client_cert",
54 "invalid_client_key", "fqdn", "provider_friendly_name", "realm",
Girish Moturuf1ce4202018-10-20 21:33:00 -070055 "device_password", "ping_addr", "radius_conf_2g", "radius_conf_5g",
56 "radius_conf_pwd")
Ang Li5cd6d3c2016-02-01 11:29:14 -080057 self.unpack_userparams(required_userparam_names,
Ang Li82522812016-06-02 13:57:21 -070058 roaming_consortium_ids=None,
59 plmn=None)
Girish Moturuf1ce4202018-10-20 21:33:00 -070060
61 if "AccessPoint" in self.user_params:
62 self.legacy_configure_ap_and_start(
63 ent_network=True,
64 radius_conf_2g=self.radius_conf_2g,
65 radius_conf_5g=self.radius_conf_5g,
66 ent_network_pwd=True,
67 radius_conf_pwd=self.radius_conf_pwd,)
68 self.ent_network_2g = self.ent_networks[0]["2g"]
69 self.ent_network_5g = self.ent_networks[0]["5g"]
70 self.ent_network_pwd = self.ent_networks_pwd[0]["2g"]
71
Ang Li73697b32015-12-03 00:41:53 +000072 # Default configs for EAP networks.
Ang Li82522812016-06-02 13:57:21 -070073 self.config_peap0 = {
Girish Moturu150d32f2017-02-14 12:27:07 -080074 Ent.EAP: int(EAP.PEAP),
Ang Li73697b32015-12-03 00:41:53 +000075 Ent.CA_CERT: self.ca_cert,
76 Ent.IDENTITY: self.eap_identity,
77 Ent.PASSWORD: self.eap_password,
Girish Moturu150d32f2017-02-14 12:27:07 -080078 Ent.PHASE2: int(EapPhase2.MSCHAPV2),
Girish Moturuf1ce4202018-10-20 21:33:00 -070079 WifiEnums.SSID_KEY: self.ent_network_5g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +000080 }
Ang Li82522812016-06-02 13:57:21 -070081 self.config_peap1 = dict(self.config_peap0)
Girish Moturuf1ce4202018-10-20 21:33:00 -070082 self.config_peap1[WifiEnums.SSID_KEY] = \
83 self.ent_network_2g[WifiEnums.SSID_KEY]
Ang Li73697b32015-12-03 00:41:53 +000084 self.config_tls = {
Girish Moturu150d32f2017-02-14 12:27:07 -080085 Ent.EAP: int(EAP.TLS),
Ang Li73697b32015-12-03 00:41:53 +000086 Ent.CA_CERT: self.ca_cert,
Girish Moturuf1ce4202018-10-20 21:33:00 -070087 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +000088 Ent.CLIENT_CERT: self.client_cert,
89 Ent.PRIVATE_KEY_ID: self.client_key,
90 Ent.IDENTITY: self.eap_identity,
91 }
92 self.config_ttls = {
Girish Moturu150d32f2017-02-14 12:27:07 -080093 Ent.EAP: int(EAP.TTLS),
Ang Li73697b32015-12-03 00:41:53 +000094 Ent.CA_CERT: self.ca_cert,
95 Ent.IDENTITY: self.eap_identity,
96 Ent.PASSWORD: self.eap_password,
Girish Moturu150d32f2017-02-14 12:27:07 -080097 Ent.PHASE2: int(EapPhase2.MSCHAPV2),
Girish Moturuf1ce4202018-10-20 21:33:00 -070098 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +000099 }
Ang Li82522812016-06-02 13:57:21 -0700100 self.config_pwd = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800101 Ent.EAP: int(EAP.PWD),
Ang Li82522812016-06-02 13:57:21 -0700102 Ent.IDENTITY: self.eap_identity,
103 Ent.PASSWORD: self.eap_password,
Girish Moturuf1ce4202018-10-20 21:33:00 -0700104 WifiEnums.SSID_KEY: self.ent_network_pwd[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700105 }
Ang Li73697b32015-12-03 00:41:53 +0000106 self.config_sim = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800107 Ent.EAP: int(EAP.SIM),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700108 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li73697b32015-12-03 00:41:53 +0000109 }
Ang Li82522812016-06-02 13:57:21 -0700110 self.config_aka = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800111 Ent.EAP: int(EAP.AKA),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700112 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700113 }
114 self.config_aka_prime = {
Girish Moturu150d32f2017-02-14 12:27:07 -0800115 Ent.EAP: int(EAP.AKA_PRIME),
Girish Moturuf1ce4202018-10-20 21:33:00 -0700116 WifiEnums.SSID_KEY: self.ent_network_2g[WifiEnums.SSID_KEY],
Ang Li82522812016-06-02 13:57:21 -0700117 }
Ang Li73697b32015-12-03 00:41:53 +0000118
119 # Base config for passpoint networks.
120 self.config_passpoint = {
121 Ent.FQDN: self.fqdn,
122 Ent.FRIENDLY_NAME: self.provider_friendly_name,
123 Ent.REALM: self.realm,
124 Ent.CA_CERT: self.passpoint_ca_cert
125 }
Ang Li82522812016-06-02 13:57:21 -0700126 if self.plmn:
Ang Li73697b32015-12-03 00:41:53 +0000127 self.config_passpoint[Ent.PLMN] = self.plmn
Ang Li82522812016-06-02 13:57:21 -0700128 if self.roaming_consortium_ids:
Ang Li81549052016-06-09 18:51:14 -0700129 self.config_passpoint[
130 Ent.ROAMING_IDS] = self.roaming_consortium_ids
Ang Li73697b32015-12-03 00:41:53 +0000131
132 # Default configs for passpoint networks.
133 self.config_passpoint_tls = dict(self.config_tls)
134 self.config_passpoint_tls.update(self.config_passpoint)
135 self.config_passpoint_tls[Ent.CLIENT_CERT] = self.passpoint_client_cert
Ang Li81549052016-06-09 18:51:14 -0700136 self.config_passpoint_tls[
137 Ent.PRIVATE_KEY_ID] = self.passpoint_client_key
Ang Li73697b32015-12-03 00:41:53 +0000138 del self.config_passpoint_tls[WifiEnums.SSID_KEY]
139 self.config_passpoint_ttls = dict(self.config_ttls)
140 self.config_passpoint_ttls.update(self.config_passpoint)
141 del self.config_passpoint_ttls[WifiEnums.SSID_KEY]
142 # Set screen lock password so ConfigStore is unlocked.
Ang Lia9d188f2016-02-17 18:03:01 -0800143 self.dut.droid.setDevicePassword(self.device_password)
Girish Moturu90f74842017-10-16 11:29:08 -0700144 self.tcpdump_pid = None
Ang Li73697b32015-12-03 00:41:53 +0000145
146 def teardown_class(self):
Ang Li8e767182015-12-09 17:29:24 -0800147 wutils.reset_wifi(self.dut)
Hsiu-Chang Chen3492edd2019-03-27 10:28:58 +0800148 self.dut.droid.disableDevicePassword(self.device_password)
Ang Lia9d188f2016-02-17 18:03:01 -0800149 self.dut.ed.clear_all_events()
Ang Li73697b32015-12-03 00:41:53 +0000150
151 def setup_test(self):
Ang Lia9d188f2016-02-17 18:03:01 -0800152 self.dut.droid.wifiStartTrackingStateChange()
153 self.dut.droid.wakeLockAcquireBright()
154 self.dut.droid.wakeUpNow()
Ang Li8e767182015-12-09 17:29:24 -0800155 wutils.reset_wifi(self.dut)
Ang Lia9d188f2016-02-17 18:03:01 -0800156 self.dut.ed.clear_all_events()
Girish Moturuf1ce4202018-10-20 21:33:00 -0700157 self.tcpdump_pid = start_tcpdump(self.dut, self.test_name)
Ang Li73697b32015-12-03 00:41:53 +0000158
159 def teardown_test(self):
Girish Moturuf1ce4202018-10-20 21:33:00 -0700160 stop_tcpdump(self.dut, self.tcpdump_pid, self.test_name)
Ang Lia9d188f2016-02-17 18:03:01 -0800161 self.dut.droid.wakeLockRelease()
162 self.dut.droid.goToSleepNow()
163 self.dut.droid.wifiStopTrackingStateChange()
Ang Li73697b32015-12-03 00:41:53 +0000164
Ang Li20377aa2016-02-26 13:19:51 -0800165 def on_fail(self, test_name, begin_time):
166 self.dut.cat_adb_log(test_name, begin_time)
167
Ang Li73697b32015-12-03 00:41:53 +0000168 """Helper Functions"""
169
170 def eap_negative_connect_logic(self, config, ad):
171 """Tries to connect to an enterprise network with invalid credentials
172 and expect a failure.
173
174 Args:
175 config: A dict representing an invalid EAP credential.
176
177 Returns:
178 True if connection failed as expected, False otherwise.
179 """
Ang Li82522812016-06-02 13:57:21 -0700180 with asserts.assert_raises(signals.TestFailure, extras=config):
Bindu Mahadev50374df2017-01-04 11:03:32 -0800181 verdict = wutils.wifi_connect(ad, config)
Ang Li82522812016-06-02 13:57:21 -0700182 asserts.explicit_pass("Connection failed as expected.")
Ang Li73697b32015-12-03 00:41:53 +0000183
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530184 def gen_negative_configs(self, config, neg_params):
Ang Li73697b32015-12-03 00:41:53 +0000185 """Generic function used to generate negative configs.
186
187 For all the valid configurations, if a param in the neg_params also
188 exists in a config, a copy of the config is made with an invalid value
189 of the param.
190
191 Args:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530192 config: A valid configuration.
Ang Li73697b32015-12-03 00:41:53 +0000193 neg_params: A dict that has all the invalid values.
194
195 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530196 An invalid configurations generated based on the valid
197 configuration. Each invalid configuration has a different invalid
Ang Li73697b32015-12-03 00:41:53 +0000198 field.
199 """
Girish Moturuc4a29842017-10-24 07:37:26 -0700200 negative_config = dict(config)
201 if negative_config in [self.config_sim, self.config_aka,
202 self.config_aka_prime]:
203 negative_config[WifiEnums.SSID_KEY] = 'wrong_hostapd_ssid'
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530204 for k, v in neg_params.items():
205 # Skip negative test for TLS's identity field since it's not
206 # used for auth.
207 if config[Ent.EAP] == EAP.TLS and k == Ent.IDENTITY:
208 continue
209 if k in config:
Girish Moturuc4a29842017-10-24 07:37:26 -0700210 negative_config[k] = v
211 negative_config["invalid_field"] = k
212 return negative_config
Ang Li73697b32015-12-03 00:41:53 +0000213
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530214 def gen_negative_eap_configs(self, config):
Ang Li73697b32015-12-03 00:41:53 +0000215 """Generates invalid configurations for different EAP authentication
216 types.
217
218 For all the valid EAP configurations, if a param that is part of the
219 authentication info exists in a config, a copy of the config is made
220 with an invalid value of the param.
221
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530222 Args:
223 A valid network configration
224
Ang Li73697b32015-12-03 00:41:53 +0000225 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530226 An invalid EAP configuration.
Ang Li73697b32015-12-03 00:41:53 +0000227 """
228 neg_params = {
229 Ent.CLIENT_CERT: self.invalid_client_cert,
230 Ent.CA_CERT: self.invalid_ca_cert,
231 Ent.PRIVATE_KEY_ID: self.invalid_client_key,
232 Ent.IDENTITY: "fake_identity",
233 Ent.PASSWORD: "wrong_password"
234 }
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530235 return self.gen_negative_configs(config, neg_params)
Ang Li73697b32015-12-03 00:41:53 +0000236
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530237 def gen_negative_passpoint_configs(self, config):
Ang Li73697b32015-12-03 00:41:53 +0000238 """Generates invalid configurations for different EAP authentication
239 types with passpoint support.
240
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530241 Args:
242 A valid network configration
243
Ang Li73697b32015-12-03 00:41:53 +0000244 Returns:
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530245 An invalid EAP configuration with passpoint fields.
Ang Li73697b32015-12-03 00:41:53 +0000246 """
247 neg_params = {
248 Ent.CLIENT_CERT: self.invalid_client_cert,
249 Ent.CA_CERT: self.invalid_ca_cert,
250 Ent.PRIVATE_KEY_ID: self.invalid_client_key,
251 Ent.IDENTITY: "fake_identity",
252 Ent.PASSWORD: "wrong_password",
253 Ent.FQDN: "fake_fqdn",
254 Ent.REALM: "where_no_one_has_gone_before",
255 Ent.PLMN: "fake_plmn",
256 Ent.ROAMING_IDS: [1234567890, 9876543210]
257 }
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530258 return self.gen_negative_configs(config, neg_params)
Roshan Pius58916a32016-06-16 16:26:44 -0700259
260 def eap_connect_toggle_wifi(self,
261 config,
262 *args):
263 """Connects to an enterprise network, toggles wifi state and ensures
264 that the device reconnects.
265
266 This logic expect the enterprise network to have Internet access.
267
268 Args:
269 config: A dict representing a wifi enterprise configuration.
270 args: args to be passed to |wutils.eap_connect|.
271
272 Returns:
273 True if the connection is successful and Internet access works.
274 """
Roshan Pius58916a32016-06-16 16:26:44 -0700275 ad = args[0]
Bindu Mahadev50374df2017-01-04 11:03:32 -0800276 wutils.wifi_connect(ad, config)
277 wutils.toggle_wifi_and_wait_for_reconnection(ad, config, num_of_tries=5)
Roshan Pius58916a32016-06-16 16:26:44 -0700278
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530279 """ Tests """
Ang Li81549052016-06-09 18:51:14 -0700280
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530281 # EAP connect tests
282 """ Test connecting to enterprise networks of different authentication
Ang Li73697b32015-12-03 00:41:53 +0000283 types.
284
285 The authentication types tested are:
286 EAP-TLS
287 EAP-PEAP with different phase2 types.
288 EAP-TTLS with different phase2 types.
289
290 Procedures:
291 For each enterprise wifi network
292 1. Connect to the network.
293 2. Send a GET request to a website and check response.
294
295 Expect:
296 Successful connection and Internet access through the enterprise
297 networks.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530298 """
299 @test_tracker_info(uuid="4e720cac-ea17-4de7-a540-8dc7c49f9713")
300 def test_eap_connect_with_config_tls(self):
301 wutils.wifi_connect(self.dut, self.config_tls)
Ang Li73697b32015-12-03 00:41:53 +0000302
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530303 @test_tracker_info(uuid="10e3a5e9-0018-4162-a9fa-b41500f13340")
304 def test_eap_connect_with_config_pwd(self):
305 wutils.wifi_connect(self.dut, self.config_pwd)
306
307 @test_tracker_info(uuid="b4513f78-a1c4-427f-bfc7-2a6b3da714b5")
308 def test_eap_connect_with_config_sim(self):
309 wutils.wifi_connect(self.dut, self.config_sim)
310
311 @test_tracker_info(uuid="7d390e30-cb67-4b55-bf00-567adad2d9b0")
312 def test_eap_connect_with_config_aka(self):
313 wutils.wifi_connect(self.dut, self.config_aka)
314
315 @test_tracker_info(uuid="742f921b-27c3-4b68-a3ca-88e64fe79c1d")
316 def test_eap_connect_with_config_aka_prime(self):
317 wutils.wifi_connect(self.dut, self.config_aka_prime)
318
319 @test_tracker_info(uuid="d34e30f3-6ef6-459f-b47a-e78ed90ce4c6")
320 def test_eap_connect_with_config_ttls_none(self):
321 config = dict(self.config_ttls)
322 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
323 wutils.wifi_connect(self.dut, config)
324
325 @test_tracker_info(uuid="0dca3a15-472e-427c-8e06-4e38088ee973")
326 def test_eap_connect_with_config_ttls_pap(self):
327 config = dict(self.config_ttls)
328 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
329 wutils.wifi_connect(self.dut, config)
330
331 @test_tracker_info(uuid="47c4b459-2cb1-4fc7-b4e7-82534e8e090e")
332 def test_eap_connect_with_config_ttls_mschap(self):
333 config = dict(self.config_ttls)
334 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
335 wutils.wifi_connect(self.dut, config)
336
337 @test_tracker_info(uuid="fdb286c7-8069-481d-baf0-c5dd7a31ff03")
338 def test_eap_connect_with_config_ttls_mschapv2(self):
339 config = dict(self.config_ttls)
340 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
341 wutils.wifi_connect(self.dut, config)
342
343 @test_tracker_info(uuid="d9315962-7987-4ee7-905d-6972c78ce8a1")
344 def test_eap_connect_with_config_ttls_gtc(self):
345 config = dict(self.config_ttls)
346 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
347 wutils.wifi_connect(self.dut, config)
348
349 @test_tracker_info(uuid="90a67bd3-30da-4daf-8ab0-d964d7ad19be")
350 def test_eap_connect_with_config_peap0_mschapv2(self):
351 config = dict(self.config_peap0)
352 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
353 wutils.wifi_connect(self.dut, config)
354
355 @test_tracker_info(uuid="3c451ba4-0c83-4eef-bc95-db4c21893008")
356 def test_eap_connect_with_config_peap0_gtc(self):
357 config = dict(self.config_peap0)
358 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
359 wutils.wifi_connect(self.dut, config)
360
361 @test_tracker_info(uuid="6b45157d-0325-417a-af18-11af5d240d79")
362 def test_eap_connect_with_config_peap1_mschapv2(self):
363 config = dict(self.config_peap1)
364 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
365 wutils.wifi_connect(self.dut, config)
366
367 @test_tracker_info(uuid="1663decc-71ae-4f95-a027-8a6dbf9c337f")
368 def test_eap_connect_with_config_peap1_gtc(self):
369 config = dict(self.config_peap1)
370 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
371 wutils.wifi_connect(self.dut, config)
372
373 # EAP connect negative tests
374 """ Test connecting to enterprise networks.
Ang Li73697b32015-12-03 00:41:53 +0000375
376 Procedures:
377 For each enterprise wifi network
378 1. Connect to the network with invalid credentials.
379
380 Expect:
381 Fail to establish connection.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530382 """
383 @test_tracker_info(uuid="b2a91f1f-ccd7-4bd1-ab81-19aab3d8ee38")
384 def test_eap_connect_negative_with_config_tls(self):
385 config = self.gen_negative_eap_configs(self.config_tls)
386 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700387
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530388 @test_tracker_info(uuid="6466abde-1d16-4168-9dd8-1e7a0a19889b")
389 def test_eap_connect_negative_with_config_pwd(self):
390 config = self.gen_negative_eap_configs(self.config_pwd)
391 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700392
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530393 @test_tracker_info(uuid="d7742a2a-85b0-409a-99d8-47711ddc5612")
394 def test_eap_connect_negative_with_config_sim(self):
395 config = self.gen_negative_eap_configs(self.config_sim)
396 self.eap_negative_connect_logic(config, self.dut)
Ang Li73697b32015-12-03 00:41:53 +0000397
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530398 @test_tracker_info(uuid="0ec0de93-cab3-4f41-960b-c0af64ff48c4")
399 def test_eap_connect_negative_with_config_aka(self):
400 config = self.gen_negative_eap_configs(self.config_aka)
401 self.eap_negative_connect_logic(config, self.dut)
402
403 @test_tracker_info(uuid="bb640ea4-32a6-48ea-87c9-f7128fffbbf6")
404 def test_eap_connect_negative_with_config_aka_prime(self):
405 config = self.gen_negative_eap_configs(self.config_aka_prime)
406 self.eap_negative_connect_logic(config, self.dut)
407
408 @test_tracker_info(uuid="86336ada-0ced-45a4-8a22-c4aa23c81111")
409 def test_eap_connect_negative_with_config_ttls_none(self):
410 config = dict(self.config_ttls)
411 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
412 config = self.gen_negative_eap_configs(config)
413 self.eap_negative_connect_logic(config, self.dut)
414
415 @test_tracker_info(uuid="71e0498d-9973-4958-94bd-79051c328920")
416 def test_eap_connect_negative_with_config_ttls_pap(self):
417 config = dict(self.config_ttls)
418 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
419 config = self.gen_negative_eap_configs(config)
420 self.eap_negative_connect_logic(config, self.dut)
421
422 @test_tracker_info(uuid="c04142a8-b204-4d2d-98dc-150b16c8397e")
423 def test_eap_connect_negative_with_config_ttls_mschap(self):
424 config = dict(self.config_ttls)
425 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
426 config = self.gen_negative_eap_configs(config)
427 self.eap_negative_connect_logic(config, self.dut)
428
429 @test_tracker_info(uuid="625e7aa5-e3e6-4bbe-98c0-5aad8ca1555b")
430 def test_eap_connect_negative_with_config_ttls_mschapv2(self):
431 config = dict(self.config_ttls)
432 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
433 config = self.gen_negative_eap_configs(config)
434 self.eap_negative_connect_logic(config, self.dut)
435
436 @test_tracker_info(uuid="24ea0d80-0a3f-41c2-8e05-d6387e589058")
437 def test_eap_connect_negative_with_config_ttls_gtc(self):
438 config = dict(self.config_ttls)
439 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
440 config = self.gen_negative_eap_configs(config)
441 self.eap_negative_connect_logic(config, self.dut)
442
443 @test_tracker_info(uuid="b7c1f0f8-6338-4501-8e1d-c9b136aaba88")
444 def test_eap_connect_negative_with_config_peap0_mschapv2(self):
445 config = dict(self.config_peap0)
446 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
447 config = self.gen_negative_eap_configs(config)
448 self.eap_negative_connect_logic(config, self.dut)
449
450 @test_tracker_info(uuid="9cf83dcb-38ad-4f75-9ea9-98de1cfaf7f3")
451 def test_eap_connect_negative_with_config_peap0_gtc(self):
452 config = dict(self.config_peap0)
453 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
454 config = self.gen_negative_eap_configs(config)
455 self.eap_negative_connect_logic(config, self.dut)
456
457 @test_tracker_info(uuid="89bb2b6b-d073-402a-bdc1-68ac5f8752a3")
458 def test_eap_connect_negative_with_config_peap1_mschapv2(self):
459 config = dict(self.config_peap1)
460 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
461 config = self.gen_negative_eap_configs(config)
462 self.eap_negative_connect_logic(config, self.dut)
463
464 @test_tracker_info(uuid="2252a864-9ff7-43b5-82d9-afe57d1f5e5f")
465 def test_eap_connect_negative_with_config_peap1_gtc(self):
466 config = dict(self.config_peap1)
467 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
468 config = self.gen_negative_eap_configs(config)
469 self.eap_negative_connect_logic(config, self.dut)
470
471 # EAP connect config store tests
472 """ Test connecting to enterprise networks of different authentication
Roshan Pius58916a32016-06-16 16:26:44 -0700473 types after wifi toggle.
474
475 The authentication types tested are:
476 EAP-TLS
477 EAP-PEAP with different phase2 types.
478 EAP-TTLS with different phase2 types.
479
480 Procedures:
481 For each enterprise wifi network
482 1. Connect to the network.
483 2. Send a GET request to a website and check response.
484 3. Toggle wifi.
485 4. Ensure that the device reconnects to the same network.
486
487 Expect:
488 Successful connection and Internet access through the enterprise
489 networks.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530490 """
491 @test_tracker_info(uuid="2a933b7f-27d7-4201-a34f-25b9d8072a8c")
492 def test_eap_connect_config_store_with_config_tls(self):
493 self.eap_connect_toggle_wifi(self.config_tls, self.dut)
Roshan Pius58916a32016-06-16 16:26:44 -0700494
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530495 @test_tracker_info(uuid="08dc071b-9fea-408a-a3f6-d3493869f6d4")
496 def test_eap_connect_config_store_with_config_pwd(self):
497 self.eap_connect_toggle_wifi(self.config_pwd, self.dut)
498
499 @test_tracker_info(uuid="230cb03e-58bc-41cb-b9b3-7215c2ab2325")
500 def test_eap_connect_config_store_with_config_sim(self):
501 self.eap_connect_toggle_wifi(self.config_sim, self.dut)
502
503 @test_tracker_info(uuid="dfc3e59c-2309-4598-8c23-bb3fe95ef89f")
504 def test_eap_connect_config_store_with_config_aka(self):
505 self.eap_connect_toggle_wifi(self.config_aka, self.dut)
506
507 @test_tracker_info(uuid="6050a1d1-4f3a-476d-bf93-638abd066790")
508 def test_eap_connect_config_store_with_config_aka_prime(self):
509 self.eap_connect_toggle_wifi(self.config_aka_prime, self.dut)
510
511 @test_tracker_info(uuid="03108057-cc44-4a80-8331-77c93694099c")
512 def test_eap_connect_config_store_with_config_ttls_none(self):
513 config = dict(self.config_ttls)
514 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
515 self.eap_connect_toggle_wifi(config, self.dut)
516
517 @test_tracker_info(uuid="53dd8195-e272-4589-a261-b8fa3607ad8d")
518 def test_eap_connect_config_store_with_config_ttls_pap(self):
519 config = dict(self.config_ttls)
520 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
521 self.eap_connect_toggle_wifi(config, self.dut)
522
523 @test_tracker_info(uuid="640f697b-9c62-4b19-bd76-53b236a152e0")
524 def test_eap_connect_config_store_with_config_ttls_mschap(self):
525 config = dict(self.config_ttls)
526 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
527 self.eap_connect_toggle_wifi(config, self.dut)
528
529 @test_tracker_info(uuid="f0243684-fae0-46f3-afbd-bf525fc712e2")
530 def test_eap_connect_config_store_with_config_ttls_mschapv2(self):
531 config = dict(self.config_ttls)
532 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
533 self.eap_connect_toggle_wifi(config, self.dut)
534
535 @test_tracker_info(uuid="49ec7202-3b00-49c3-970a-201360888c74")
536 def test_eap_connect_config_store_with_config_ttls_gtc(self):
537 config = dict(self.config_ttls)
538 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
539 self.eap_connect_toggle_wifi(config, self.dut)
540
541 @test_tracker_info(uuid="1c6abfa3-f344-4e28-b891-5481ab79efcf")
542 def test_eap_connect_config_store_with_config_peap0_mschapv2(self):
543 config = dict(self.config_peap0)
544 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
545 self.eap_connect_toggle_wifi(config, self.dut)
546
547 @test_tracker_info(uuid="2815bc76-49fa-43a5-a4b6-84788f9809d5")
548 def test_eap_connect_config_store_with_config_peap0_gtc(self):
549 config = dict(self.config_peap0)
550 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
551 self.eap_connect_toggle_wifi(config, self.dut)
552
553 @test_tracker_info(uuid="e93f7472-6895-4e36-bff2-9b2dcfd07ad0")
554 def test_eap_connect_config_store_with_config_peap1_mschapv2(self):
555 config = dict(self.config_peap1)
556 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
557 self.eap_connect_toggle_wifi(config, self.dut)
558
559 @test_tracker_info(uuid="6da72fa0-b858-4475-9559-46fe052d0d64")
560 def test_eap_connect_config_store_with_config_peap1_gtc(self):
561 config = dict(self.config_peap1)
562 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
563 self.eap_connect_toggle_wifi(config, self.dut)
564
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700565 # Removing 'test_' for all passpoint based testcases as we want to disable
566 # them. Adding the valid test cases to self.tests make them run in serial
567 # (TODO): gmoturu - Update the passpoint tests to test the valid scenario
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530568 # Passpoint connect tests
569 """ Test connecting to enterprise networks of different authentication
Ang Li73697b32015-12-03 00:41:53 +0000570 types with passpoint support.
571
572 The authentication types tested are:
573 EAP-TLS
574 EAP-TTLS with MSCHAPV2 as phase2.
575
576 Procedures:
577 For each enterprise wifi network
578 1. Connect to the network.
579 2. Send a GET request to a website and check response.
580
581 Expect:
582 Successful connection and Internet access through the enterprise
583 networks with passpoint support.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530584 """
585 @test_tracker_info(uuid="0b942524-bde9-4fc6-ac6a-fef1c247cb8e")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700586 def passpoint_connect_with_config_passpoint_tls(self):
Ang Lic2d45212016-03-10 18:38:53 -0800587 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530588 "Passpoint is not supported on %s" % self.dut.model)
589 wutils.wifi_connect(self.dut, self.config_passpoint_tls)
Ang Li73697b32015-12-03 00:41:53 +0000590
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530591 @test_tracker_info(uuid="33a014aa-99e7-4612-b732-54fabf1bf922")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700592 def passpoint_connect_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530593 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
594 "Passpoint is not supported on %s" % self.dut.model)
595 config = dict(self.config_passpoint_ttls)
596 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
597 wutils.wifi_connect(self.dut, config)
598
599 @test_tracker_info(uuid="1aba8bf9-2b09-4956-b418-c3f4dadab330")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700600 def passpoint_connect_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530601 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
602 "Passpoint is not supported on %s" % self.dut.model)
603 config = dict(self.config_passpoint_ttls)
604 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
605 wutils.wifi_connect(self.dut, config)
606
607 @test_tracker_info(uuid="cd978fc9-a393-4b1e-bba3-1efc52224500")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700608 def passpoint_connect_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530609 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
610 "Passpoint is not supported on %s" % self.dut.model)
611 config = dict(self.config_passpoint_ttls)
612 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
613 wutils.wifi_connect(self.dut, config)
614
615 @test_tracker_info(uuid="bc311ee7-ba64-4c76-a629-b916701bf6a5")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700616 def passpoint_connect_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530617 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
618 "Passpoint is not supported on %s" % self.dut.model)
619 config = dict(self.config_passpoint_ttls)
620 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
621 wutils.wifi_connect(self.dut, config)
622
623 @test_tracker_info(uuid="357e5162-5081-4149-bedd-ef2c0f88b97e")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700624 def passpoint_connect_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530625 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
626 "Passpoint is not supported on %s" % self.dut.model)
627 config = dict(self.config_passpoint_ttls)
628 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
629 wutils.wifi_connect(self.dut, config)
630
631 # Passpoint connect negative tests
632 """ Test connecting to enterprise networks.
Ang Li73697b32015-12-03 00:41:53 +0000633
634 Procedures:
635 For each enterprise wifi network
636 1. Connect to the network with invalid credentials.
637
638 Expect:
639 Fail to establish connection.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530640 """
641 @test_tracker_info(uuid="7b6b44a0-ff70-49b4-94ca-a98bedc18f92")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700642 def passpoint_connect_negative_with_config_passpoint_tls(self):
Ang Lic2d45212016-03-10 18:38:53 -0800643 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530644 "Passpoint is not supported on %s" % self.dut.model)
645 config = self.gen_negative_passpoint_configs(self.config_passpoint_tls)
646 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700647
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530648 @test_tracker_info(uuid="3dbde40a-e88c-4166-b932-163663a10a41")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700649 def passpoint_connect_negative_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530650 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
651 "Passpoint is not supported on %s" % self.dut.model)
652 config = dict(self.config_passpoint_ttls)
653 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
654 config = self.gen_negative_passpoint_configs(config)
655 self.eap_negative_connect_logic(config, self.dut)
Ang Li81549052016-06-09 18:51:14 -0700656
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530657 @test_tracker_info(uuid="8ee22ad6-d561-4ca2-a808-9f372fce56b4")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700658 def passpoint_connect_negative_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530659 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
660 "Passpoint is not supported on %s" % self.dut.model)
661 config = dict(self.config_passpoint_ttls)
662 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
663 config = self.gen_negative_passpoint_configs(config)
664 self.eap_negative_connect_logic(config, self.dut)
Roshan Pius58916a32016-06-16 16:26:44 -0700665
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530666 @test_tracker_info(uuid="db5cefe7-9cb8-47a6-8635-006c80b97012")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700667 def passpoint_connect_negative_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530668 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
669 "Passpoint is not supported on %s" % self.dut.model)
670 config = dict(self.config_passpoint_ttls)
671 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
672 config = self.gen_negative_passpoint_configs(config)
673 self.eap_negative_connect_logic(config, self.dut)
674
675 @test_tracker_info(uuid="8f49496e-80df-48ce-9c51-42f0c6b81aff")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700676 def passpoint_connect_negative_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530677 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
678 "Passpoint is not supported on %s" % self.dut.model)
679 config = dict(self.config_passpoint_ttls)
680 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
681 config = self.gen_negative_passpoint_configs(config)
682 self.eap_negative_connect_logic(config, self.dut)
683
684 @test_tracker_info(uuid="6561508f-598e-408d-96b6-15b631664be6")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700685 def passpoint_connect_negative_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530686 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
687 "Passpoint is not supported on %s" % self.dut.model)
688 config = dict(self.config_passpoint_ttls)
689 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
690 config = self.gen_negative_passpoint_configs(config)
691 self.eap_negative_connect_logic(config, self.dut)
692
693 # Passpoint connect config store tests
694 """ Test connecting to enterprise networks of different authentication
Roshan Pius58916a32016-06-16 16:26:44 -0700695 types with passpoint support after wifi toggle.
696
697 The authentication types tested are:
698 EAP-TLS
699 EAP-TTLS with MSCHAPV2 as phase2.
700
701 Procedures:
702 For each enterprise wifi network
703 1. Connect to the network.
704 2. Send a GET request to a website and check response.
705 3. Toggle wifi.
706 4. Ensure that the device reconnects to the same network.
707
708 Expect:
709 Successful connection and Internet access through the enterprise
710 networks with passpoint support.
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530711 """
712 @test_tracker_info(uuid="5d5e6bb0-faea-4a6e-a6bc-c87de997a4fd")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700713 def passpoint_connect_config_store_with_config_passpoint_tls(self):
Roshan Pius58916a32016-06-16 16:26:44 -0700714 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530715 "Passpoint is not supported on %s" % self.dut.model)
716 self.eap_connect_toggle_wifi(self.config_passpoint_tls, self.dut)
717
718 @test_tracker_info(uuid="0c80262d-23c1-439f-ad64-7b8ada5d1962")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700719 def passpoint_connect_config_store_with_config_passpoint_ttls_none(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530720 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
721 "Passpoint is not supported on %s" % self.dut.model)
722 config = dict(self.config_passpoint_ttls)
723 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.NONE.value
724 self.eap_connect_toggle_wifi(config, self.dut)
725
726 @test_tracker_info(uuid="786e424c-b5a6-4fe9-a951-b3de16ebb6db")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700727 def passpoint_connect_config_store_with_config_passpoint_ttls_pap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530728 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
729 "Passpoint is not supported on %s" % self.dut.model)
730 config = dict(self.config_passpoint_ttls)
731 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.PAP.value
732 self.eap_connect_toggle_wifi(config, self.dut)
733
734 @test_tracker_info(uuid="22fd61bf-722a-4016-a778-fc33e94ed211")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700735 def passpoint_connect_config_store_with_config_passpoint_ttls_mschap(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530736 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
737 "Passpoint is not supported on %s" % self.dut.model)
738 config = dict(self.config_passpoint_ttls)
739 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAP.value
740 self.eap_connect_toggle_wifi(config, self.dut)
741
742 @test_tracker_info(uuid="2abd348c-9c66-456b-88ad-55f971717620")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700743 def passpoint_connect_config_store_with_config_passpoint_ttls_mschapv2(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530744 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
745 "Passpoint is not supported on %s" % self.dut.model)
746 config = dict(self.config_passpoint_ttls)
747 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.MSCHAPV2.value
748 self.eap_connect_toggle_wifi(config, self.dut)
749
750 @test_tracker_info(uuid="043e8cdd-db95-4f03-b308-3c8cecf874b1")
Girish Moturu89d8c7f2017-09-05 11:52:54 -0700751 def passpoint_connect_config_store_with_config_passpoint_ttls_gtc(self):
Girish Moturu9cc1cd12017-07-24 13:27:57 +0530752 asserts.skip_if(not self.dut.droid.wifiIsPasspointSupported(),
753 "Passpoint is not supported on %s" % self.dut.model)
754 config = dict(self.config_passpoint_ttls)
755 config[WifiEnums.Enterprise.PHASE2] = WifiEnums.EapPhase2.GTC.value
756 self.eap_connect_toggle_wifi(config, self.dut)