test_ap_eap.py 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. #!/usr/bin/python
  2. #
  3. # WPA2-Enterprise tests
  4. # Copyright (c) 2013-2014, Jouni Malinen <j@w1.fi>
  5. #
  6. # This software may be distributed under the terms of the BSD license.
  7. # See README for more details.
  8. import time
  9. import subprocess
  10. import logging
  11. logger = logging.getLogger()
  12. import os.path
  13. import hwsim_utils
  14. import hostapd
  15. def eap_connect(dev, ap, method, identity, anonymous_identity=None,
  16. password=None,
  17. phase1=None, phase2=None, ca_cert=None,
  18. domain_suffix_match=None, password_hex=None,
  19. client_cert=None, private_key=None, sha256=False,
  20. fragment_size=None, expect_failure=False,
  21. local_error_report=False,
  22. ca_cert2=None, client_cert2=None, private_key2=None,
  23. pac_file=None, subject_match=None, altsubject_match=None):
  24. hapd = hostapd.Hostapd(ap['ifname'])
  25. id = dev.connect("test-wpa2-eap", key_mgmt="WPA-EAP WPA-EAP-SHA256",
  26. eap=method, identity=identity,
  27. anonymous_identity=anonymous_identity,
  28. password=password, phase1=phase1, phase2=phase2,
  29. ca_cert=ca_cert, domain_suffix_match=domain_suffix_match,
  30. wait_connect=False, scan_freq="2412",
  31. password_hex=password_hex,
  32. client_cert=client_cert, private_key=private_key,
  33. ieee80211w="1", fragment_size=fragment_size,
  34. ca_cert2=ca_cert2, client_cert2=client_cert2,
  35. private_key2=private_key2, pac_file=pac_file,
  36. subject_match=subject_match,
  37. altsubject_match=altsubject_match)
  38. eap_check_auth(dev, method, True, sha256=sha256,
  39. expect_failure=expect_failure,
  40. local_error_report=local_error_report)
  41. if expect_failure:
  42. return id
  43. ev = hapd.wait_event([ "AP-STA-CONNECTED" ], timeout=5)
  44. if ev is None:
  45. raise Exception("No connection event received from hostapd")
  46. return id
  47. def eap_check_auth(dev, method, initial, rsn=True, sha256=False,
  48. expect_failure=False, local_error_report=False):
  49. ev = dev.wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  50. if ev is None:
  51. raise Exception("Association and EAP start timed out")
  52. ev = dev.wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
  53. if ev is None:
  54. raise Exception("EAP method selection timed out")
  55. if method not in ev:
  56. raise Exception("Unexpected EAP method")
  57. if expect_failure:
  58. ev = dev.wait_event(["CTRL-EVENT-EAP-FAILURE"])
  59. if ev is None:
  60. raise Exception("EAP failure timed out")
  61. ev = dev.wait_event(["CTRL-EVENT-DISCONNECTED"])
  62. if ev is None:
  63. raise Exception("Disconnection timed out")
  64. if not local_error_report:
  65. if "reason=23" not in ev:
  66. raise Exception("Proper reason code for disconnection not reported")
  67. return
  68. ev = dev.wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=10)
  69. if ev is None:
  70. raise Exception("EAP success timed out")
  71. if initial:
  72. ev = dev.wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
  73. else:
  74. ev = dev.wait_event(["WPA: Key negotiation completed"], timeout=10)
  75. if ev is None:
  76. raise Exception("Association with the AP timed out")
  77. status = dev.get_status()
  78. if status["wpa_state"] != "COMPLETED":
  79. raise Exception("Connection not completed")
  80. if status["suppPortStatus"] != "Authorized":
  81. raise Exception("Port not authorized")
  82. if method not in status["selectedMethod"]:
  83. raise Exception("Incorrect EAP method status")
  84. if sha256:
  85. e = "WPA2-EAP-SHA256"
  86. elif rsn:
  87. e = "WPA2/IEEE 802.1X/EAP"
  88. else:
  89. e = "WPA/IEEE 802.1X/EAP"
  90. if status["key_mgmt"] != e:
  91. raise Exception("Unexpected key_mgmt status: " + status["key_mgmt"])
  92. def eap_reauth(dev, method, rsn=True, sha256=False):
  93. dev.request("REAUTHENTICATE")
  94. eap_check_auth(dev, method, False, rsn=rsn, sha256=sha256)
  95. def test_ap_wpa2_eap_sim(dev, apdev):
  96. """WPA2-Enterprise connection using EAP-SIM"""
  97. if not os.path.exists("/tmp/hlr_auc_gw.sock"):
  98. logger.info("No hlr_auc_gw available");
  99. return "skip"
  100. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  101. hostapd.add_ap(apdev[0]['ifname'], params)
  102. eap_connect(dev[0], apdev[0], "SIM", "1232010000000000",
  103. password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581")
  104. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  105. eap_reauth(dev[0], "SIM")
  106. logger.info("Negative test with incorrect key")
  107. dev[0].request("REMOVE_NETWORK all")
  108. eap_connect(dev[0], apdev[0], "SIM", "1232010000000000",
  109. password="ffdca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581",
  110. expect_failure=True)
  111. def test_ap_wpa2_eap_aka(dev, apdev):
  112. """WPA2-Enterprise connection using EAP-AKA"""
  113. if not os.path.exists("/tmp/hlr_auc_gw.sock"):
  114. logger.info("No hlr_auc_gw available");
  115. return "skip"
  116. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  117. hostapd.add_ap(apdev[0]['ifname'], params)
  118. eap_connect(dev[0], apdev[0], "AKA", "0232010000000000",
  119. password="90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123")
  120. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  121. eap_reauth(dev[0], "AKA")
  122. logger.info("Negative test with incorrect key")
  123. dev[0].request("REMOVE_NETWORK all")
  124. eap_connect(dev[0], apdev[0], "AKA", "0232010000000000",
  125. password="ffdca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:000000000123",
  126. expect_failure=True)
  127. def test_ap_wpa2_eap_aka_prime(dev, apdev):
  128. """WPA2-Enterprise connection using EAP-AKA'"""
  129. if not os.path.exists("/tmp/hlr_auc_gw.sock"):
  130. logger.info("No hlr_auc_gw available");
  131. return "skip"
  132. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  133. hostapd.add_ap(apdev[0]['ifname'], params)
  134. eap_connect(dev[0], apdev[0], "AKA'", "6555444333222111",
  135. password="5122250214c33e723a5dd523fc145fc0:981d464c7c52eb6e5036234984ad0bcf:000000000123")
  136. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  137. eap_reauth(dev[0], "AKA'")
  138. logger.info("Negative test with incorrect key")
  139. dev[0].request("REMOVE_NETWORK all")
  140. eap_connect(dev[0], apdev[0], "AKA'", "6555444333222111",
  141. password="ff22250214c33e723a5dd523fc145fc0:981d464c7c52eb6e5036234984ad0bcf:000000000123",
  142. expect_failure=True)
  143. def test_ap_wpa2_eap_ttls_pap(dev, apdev):
  144. """WPA2-Enterprise connection using EAP-TTLS/PAP"""
  145. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  146. hostapd.add_ap(apdev[0]['ifname'], params)
  147. eap_connect(dev[0], apdev[0], "TTLS", "pap user",
  148. anonymous_identity="ttls", password="password",
  149. ca_cert="auth_serv/ca.pem", phase2="auth=PAP",
  150. subject_match="/C=FI/O=w1.fi/CN=server.w1.fi",
  151. altsubject_match="EMAIL:noone@example.com;DNS:server.w1.fi;URI:http://example.com/")
  152. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  153. eap_reauth(dev[0], "TTLS")
  154. def test_ap_wpa2_eap_ttls_chap(dev, apdev):
  155. """WPA2-Enterprise connection using EAP-TTLS/CHAP"""
  156. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  157. hostapd.add_ap(apdev[0]['ifname'], params)
  158. eap_connect(dev[0], apdev[0], "TTLS", "chap user",
  159. anonymous_identity="ttls", password="password",
  160. ca_cert="auth_serv/ca.der", phase2="auth=CHAP")
  161. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  162. eap_reauth(dev[0], "TTLS")
  163. def test_ap_wpa2_eap_ttls_mschap(dev, apdev):
  164. """WPA2-Enterprise connection using EAP-TTLS/MSCHAP"""
  165. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  166. hostapd.add_ap(apdev[0]['ifname'], params)
  167. eap_connect(dev[0], apdev[0], "TTLS", "mschap user",
  168. anonymous_identity="ttls", password="password",
  169. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAP",
  170. domain_suffix_match="server.w1.fi")
  171. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  172. eap_reauth(dev[0], "TTLS")
  173. dev[0].request("REMOVE_NETWORK all")
  174. eap_connect(dev[0], apdev[0], "TTLS", "mschap user",
  175. anonymous_identity="ttls", password="password",
  176. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAP",
  177. fragment_size="200")
  178. def test_ap_wpa2_eap_ttls_mschapv2(dev, apdev):
  179. """WPA2-Enterprise connection using EAP-TTLS/MSCHAPv2"""
  180. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  181. hostapd.add_ap(apdev[0]['ifname'], params)
  182. hapd = hostapd.Hostapd(apdev[0]['ifname'])
  183. eap_connect(dev[0], apdev[0], "TTLS", "DOMAIN\mschapv2 user",
  184. anonymous_identity="ttls", password="password",
  185. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
  186. domain_suffix_match="w1.fi")
  187. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  188. sta1 = hapd.get_sta(dev[0].p2p_interface_addr())
  189. eapol1 = hapd.get_sta(dev[0].p2p_interface_addr(), info="eapol")
  190. eap_reauth(dev[0], "TTLS")
  191. sta2 = hapd.get_sta(dev[0].p2p_interface_addr())
  192. eapol2 = hapd.get_sta(dev[0].p2p_interface_addr(), info="eapol")
  193. if int(sta2['dot1xAuthEapolFramesRx']) <= int(sta1['dot1xAuthEapolFramesRx']):
  194. raise Exception("dot1xAuthEapolFramesRx did not increase")
  195. if int(eapol2['authAuthEapStartsWhileAuthenticated']) < 1:
  196. raise Exception("authAuthEapStartsWhileAuthenticated did not increase")
  197. if int(eapol2['backendAuthSuccesses']) <= int(eapol1['backendAuthSuccesses']):
  198. raise Exception("backendAuthSuccesses did not increase")
  199. logger.info("Password as hash value")
  200. dev[0].request("REMOVE_NETWORK all")
  201. eap_connect(dev[0], apdev[0], "TTLS", "DOMAIN\mschapv2 user",
  202. anonymous_identity="ttls",
  203. password_hex="hash:8846f7eaee8fb117ad06bdd830b7586c",
  204. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2")
  205. logger.info("Negative test with incorrect password")
  206. dev[0].request("REMOVE_NETWORK all")
  207. eap_connect(dev[0], apdev[0], "TTLS", "DOMAIN\mschapv2 user",
  208. anonymous_identity="ttls", password="password1",
  209. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
  210. expect_failure=True)
  211. def test_ap_wpa2_eap_ttls_eap_gtc(dev, apdev):
  212. """WPA2-Enterprise connection using EAP-TTLS/EAP-GTC"""
  213. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  214. hostapd.add_ap(apdev[0]['ifname'], params)
  215. eap_connect(dev[0], apdev[0], "TTLS", "user",
  216. anonymous_identity="ttls", password="password",
  217. ca_cert="auth_serv/ca.pem", phase2="autheap=GTC")
  218. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  219. eap_reauth(dev[0], "TTLS")
  220. def test_ap_wpa2_eap_ttls_eap_md5(dev, apdev):
  221. """WPA2-Enterprise connection using EAP-TTLS/EAP-MD5"""
  222. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  223. hostapd.add_ap(apdev[0]['ifname'], params)
  224. eap_connect(dev[0], apdev[0], "TTLS", "user",
  225. anonymous_identity="ttls", password="password",
  226. ca_cert="auth_serv/ca.pem", phase2="autheap=MD5")
  227. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  228. eap_reauth(dev[0], "TTLS")
  229. def test_ap_wpa2_eap_ttls_eap_mschapv2(dev, apdev):
  230. """WPA2-Enterprise connection using EAP-TTLS/EAP-MSCHAPv2"""
  231. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  232. hostapd.add_ap(apdev[0]['ifname'], params)
  233. eap_connect(dev[0], apdev[0], "TTLS", "user",
  234. anonymous_identity="ttls", password="password",
  235. ca_cert="auth_serv/ca.pem", phase2="autheap=MSCHAPV2")
  236. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  237. eap_reauth(dev[0], "TTLS")
  238. logger.info("Negative test with incorrect password")
  239. dev[0].request("REMOVE_NETWORK all")
  240. eap_connect(dev[0], apdev[0], "TTLS", "user",
  241. anonymous_identity="ttls", password="password1",
  242. ca_cert="auth_serv/ca.pem", phase2="autheap=MSCHAPV2",
  243. expect_failure=True)
  244. def test_ap_wpa2_eap_peap_eap_mschapv2(dev, apdev):
  245. """WPA2-Enterprise connection using EAP-PEAP/EAP-MSCHAPv2"""
  246. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  247. hostapd.add_ap(apdev[0]['ifname'], params)
  248. eap_connect(dev[0], apdev[0], "PEAP", "user",
  249. anonymous_identity="peap", password="password",
  250. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2")
  251. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  252. eap_reauth(dev[0], "PEAP")
  253. dev[0].request("REMOVE_NETWORK all")
  254. eap_connect(dev[0], apdev[0], "PEAP", "user",
  255. anonymous_identity="peap", password="password",
  256. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
  257. fragment_size="200")
  258. logger.info("Password as hash value")
  259. dev[0].request("REMOVE_NETWORK all")
  260. eap_connect(dev[0], apdev[0], "PEAP", "user",
  261. anonymous_identity="peap",
  262. password_hex="hash:8846f7eaee8fb117ad06bdd830b7586c",
  263. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2")
  264. logger.info("Negative test with incorrect password")
  265. dev[0].request("REMOVE_NETWORK all")
  266. eap_connect(dev[0], apdev[0], "PEAP", "user",
  267. anonymous_identity="peap", password="password1",
  268. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
  269. expect_failure=True)
  270. def test_ap_wpa2_eap_peap_crypto_binding(dev, apdev):
  271. """WPA2-Enterprise connection using EAP-PEAPv0/EAP-MSCHAPv2 and crypto binding"""
  272. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  273. hostapd.add_ap(apdev[0]['ifname'], params)
  274. eap_connect(dev[0], apdev[0], "PEAP", "user", password="password",
  275. ca_cert="auth_serv/ca.pem",
  276. phase1="peapver=0 crypto_binding=2",
  277. phase2="auth=MSCHAPV2")
  278. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  279. eap_reauth(dev[0], "PEAP")
  280. def test_ap_wpa2_eap_peap_eap_tls(dev, apdev):
  281. """WPA2-Enterprise connection using EAP-PEAP/EAP-TLS"""
  282. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  283. hostapd.add_ap(apdev[0]['ifname'], params)
  284. eap_connect(dev[0], apdev[0], "PEAP", "cert user",
  285. ca_cert="auth_serv/ca.pem", phase2="auth=TLS",
  286. ca_cert2="auth_serv/ca.pem",
  287. client_cert2="auth_serv/user.pem",
  288. private_key2="auth_serv/user.key")
  289. eap_reauth(dev[0], "PEAP")
  290. def test_ap_wpa2_eap_tls(dev, apdev):
  291. """WPA2-Enterprise connection using EAP-TLS"""
  292. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  293. hostapd.add_ap(apdev[0]['ifname'], params)
  294. eap_connect(dev[0], apdev[0], "TLS", "tls user", ca_cert="auth_serv/ca.pem",
  295. client_cert="auth_serv/user.pem",
  296. private_key="auth_serv/user.key")
  297. eap_reauth(dev[0], "TLS")
  298. def test_ap_wpa2_eap_tls_neg_incorrect_trust_root(dev, apdev):
  299. """WPA2-Enterprise negative test - incorrect trust root"""
  300. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  301. hostapd.add_ap(apdev[0]['ifname'], params)
  302. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  303. identity="DOMAIN\mschapv2 user", anonymous_identity="ttls",
  304. password="password", phase2="auth=MSCHAPV2",
  305. ca_cert="auth_serv/ca-incorrect.pem",
  306. wait_connect=False, scan_freq="2412")
  307. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  308. if ev is None:
  309. raise Exception("Association and EAP start timed out")
  310. ev = dev[0].wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
  311. if ev is None:
  312. raise Exception("EAP method selection timed out")
  313. if "TTLS" not in ev:
  314. raise Exception("Unexpected EAP method")
  315. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR",
  316. "CTRL-EVENT-EAP-SUCCESS",
  317. "CTRL-EVENT-EAP-FAILURE",
  318. "CTRL-EVENT-CONNECTED",
  319. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  320. if ev is None:
  321. raise Exception("EAP result timed out")
  322. if "CTRL-EVENT-EAP-TLS-CERT-ERROR" not in ev:
  323. raise Exception("TLS certificate error not reported")
  324. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS",
  325. "CTRL-EVENT-EAP-FAILURE",
  326. "CTRL-EVENT-CONNECTED",
  327. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  328. if ev is None:
  329. raise Exception("EAP result(2) timed out")
  330. if "CTRL-EVENT-EAP-FAILURE" not in ev:
  331. raise Exception("EAP failure not reported")
  332. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED",
  333. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  334. if ev is None:
  335. raise Exception("EAP result(3) timed out")
  336. if "CTRL-EVENT-DISCONNECTED" not in ev:
  337. raise Exception("Disconnection not reported")
  338. ev = dev[0].wait_event(["CTRL-EVENT-SSID-TEMP-DISABLED"], timeout=10)
  339. if ev is None:
  340. raise Exception("Network block disabling not reported")
  341. def test_ap_wpa2_eap_tls_neg_suffix_match(dev, apdev):
  342. """WPA2-Enterprise negative test - domain suffix mismatch"""
  343. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  344. hostapd.add_ap(apdev[0]['ifname'], params)
  345. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  346. identity="DOMAIN\mschapv2 user", anonymous_identity="ttls",
  347. password="password", phase2="auth=MSCHAPV2",
  348. ca_cert="auth_serv/ca.pem",
  349. domain_suffix_match="incorrect.example.com",
  350. wait_connect=False, scan_freq="2412")
  351. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  352. if ev is None:
  353. raise Exception("Association and EAP start timed out")
  354. ev = dev[0].wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
  355. if ev is None:
  356. raise Exception("EAP method selection timed out")
  357. if "TTLS" not in ev:
  358. raise Exception("Unexpected EAP method")
  359. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR",
  360. "CTRL-EVENT-EAP-SUCCESS",
  361. "CTRL-EVENT-EAP-FAILURE",
  362. "CTRL-EVENT-CONNECTED",
  363. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  364. if ev is None:
  365. raise Exception("EAP result timed out")
  366. if "CTRL-EVENT-EAP-TLS-CERT-ERROR" not in ev:
  367. raise Exception("TLS certificate error not reported")
  368. if "Domain suffix mismatch" not in ev:
  369. raise Exception("Domain suffix mismatch not reported")
  370. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS",
  371. "CTRL-EVENT-EAP-FAILURE",
  372. "CTRL-EVENT-CONNECTED",
  373. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  374. if ev is None:
  375. raise Exception("EAP result(2) timed out")
  376. if "CTRL-EVENT-EAP-FAILURE" not in ev:
  377. raise Exception("EAP failure not reported")
  378. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED",
  379. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  380. if ev is None:
  381. raise Exception("EAP result(3) timed out")
  382. if "CTRL-EVENT-DISCONNECTED" not in ev:
  383. raise Exception("Disconnection not reported")
  384. ev = dev[0].wait_event(["CTRL-EVENT-SSID-TEMP-DISABLED"], timeout=10)
  385. if ev is None:
  386. raise Exception("Network block disabling not reported")
  387. def test_ap_wpa2_eap_tls_neg_subject_match(dev, apdev):
  388. """WPA2-Enterprise negative test - subject mismatch"""
  389. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  390. hostapd.add_ap(apdev[0]['ifname'], params)
  391. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  392. identity="DOMAIN\mschapv2 user", anonymous_identity="ttls",
  393. password="password", phase2="auth=MSCHAPV2",
  394. ca_cert="auth_serv/ca.pem",
  395. subject_match="/C=FI/O=w1.fi/CN=example.com",
  396. wait_connect=False, scan_freq="2412")
  397. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  398. if ev is None:
  399. raise Exception("Association and EAP start timed out")
  400. ev = dev[0].wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
  401. if ev is None:
  402. raise Exception("EAP method selection timed out")
  403. if "TTLS" not in ev:
  404. raise Exception("Unexpected EAP method")
  405. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR",
  406. "CTRL-EVENT-EAP-SUCCESS",
  407. "CTRL-EVENT-EAP-FAILURE",
  408. "CTRL-EVENT-CONNECTED",
  409. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  410. if ev is None:
  411. raise Exception("EAP result timed out")
  412. if "CTRL-EVENT-EAP-TLS-CERT-ERROR" not in ev:
  413. raise Exception("TLS certificate error not reported")
  414. if "Subject mismatch" not in ev:
  415. raise Exception("Subject mismatch not reported")
  416. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS",
  417. "CTRL-EVENT-EAP-FAILURE",
  418. "CTRL-EVENT-CONNECTED",
  419. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  420. if ev is None:
  421. raise Exception("EAP result(2) timed out")
  422. if "CTRL-EVENT-EAP-FAILURE" not in ev:
  423. raise Exception("EAP failure not reported")
  424. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED",
  425. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  426. if ev is None:
  427. raise Exception("EAP result(3) timed out")
  428. if "CTRL-EVENT-DISCONNECTED" not in ev:
  429. raise Exception("Disconnection not reported")
  430. ev = dev[0].wait_event(["CTRL-EVENT-SSID-TEMP-DISABLED"], timeout=10)
  431. if ev is None:
  432. raise Exception("Network block disabling not reported")
  433. def test_ap_wpa2_eap_tls_neg_altsubject_match(dev, apdev):
  434. """WPA2-Enterprise negative test - altsubject mismatch"""
  435. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  436. hostapd.add_ap(apdev[0]['ifname'], params)
  437. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  438. identity="DOMAIN\mschapv2 user", anonymous_identity="ttls",
  439. password="password", phase2="auth=MSCHAPV2",
  440. ca_cert="auth_serv/ca.pem",
  441. altsubject_match="incorrect.example.com",
  442. wait_connect=False, scan_freq="2412")
  443. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  444. if ev is None:
  445. raise Exception("Association and EAP start timed out")
  446. ev = dev[0].wait_event(["CTRL-EVENT-EAP-METHOD"], timeout=10)
  447. if ev is None:
  448. raise Exception("EAP method selection timed out")
  449. if "TTLS" not in ev:
  450. raise Exception("Unexpected EAP method")
  451. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR",
  452. "CTRL-EVENT-EAP-SUCCESS",
  453. "CTRL-EVENT-EAP-FAILURE",
  454. "CTRL-EVENT-CONNECTED",
  455. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  456. if ev is None:
  457. raise Exception("EAP result timed out")
  458. if "CTRL-EVENT-EAP-TLS-CERT-ERROR" not in ev:
  459. raise Exception("TLS certificate error not reported")
  460. if "AltSubject mismatch" not in ev:
  461. raise Exception("altsubject mismatch not reported")
  462. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS",
  463. "CTRL-EVENT-EAP-FAILURE",
  464. "CTRL-EVENT-CONNECTED",
  465. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  466. if ev is None:
  467. raise Exception("EAP result(2) timed out")
  468. if "CTRL-EVENT-EAP-FAILURE" not in ev:
  469. raise Exception("EAP failure not reported")
  470. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED",
  471. "CTRL-EVENT-DISCONNECTED"], timeout=10)
  472. if ev is None:
  473. raise Exception("EAP result(3) timed out")
  474. if "CTRL-EVENT-DISCONNECTED" not in ev:
  475. raise Exception("Disconnection not reported")
  476. ev = dev[0].wait_event(["CTRL-EVENT-SSID-TEMP-DISABLED"], timeout=10)
  477. if ev is None:
  478. raise Exception("Network block disabling not reported")
  479. def test_ap_wpa2_eap_ttls_server_cert_hash(dev, apdev):
  480. """WPA2-Enterprise connection using EAP-TTLS and server certificate hash"""
  481. srv_cert_hash = "0a3f81f63569226657a069855bb13f3b922670437a2b87585a4734f70ac7315b"
  482. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  483. hostapd.add_ap(apdev[0]['ifname'], params)
  484. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  485. identity="probe", ca_cert="probe://",
  486. wait_connect=False, scan_freq="2412")
  487. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  488. if ev is None:
  489. raise Exception("Association and EAP start timed out")
  490. ev = dev[0].wait_event(["CTRL-EVENT-EAP-PEER-CERT depth=0"], timeout=10)
  491. if ev is None:
  492. raise Exception("No peer server certificate event seen")
  493. if "hash=" + srv_cert_hash not in ev:
  494. raise Exception("Expected server certificate hash not reported")
  495. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR"], timeout=10)
  496. if ev is None:
  497. raise Exception("EAP result timed out")
  498. if "Server certificate chain probe" not in ev:
  499. raise Exception("Server certificate probe not reported")
  500. ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=10)
  501. if ev is None:
  502. raise Exception("Disconnection event not seen")
  503. dev[0].request("REMOVE_NETWORK all")
  504. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
  505. identity="DOMAIN\mschapv2 user", anonymous_identity="ttls",
  506. password="password", phase2="auth=MSCHAPV2",
  507. ca_cert="hash://server/sha256/5a1bc1296205e6fdbe3979728efe3920798885c1c4590b5f90f43222d239ca6a",
  508. wait_connect=False, scan_freq="2412")
  509. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=10)
  510. if ev is None:
  511. raise Exception("Association and EAP start timed out")
  512. ev = dev[0].wait_event(["CTRL-EVENT-EAP-TLS-CERT-ERROR"], timeout=10)
  513. if ev is None:
  514. raise Exception("EAP result timed out")
  515. if "Server certificate mismatch" not in ev:
  516. raise Exception("Server certificate mismatch not reported")
  517. ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=10)
  518. if ev is None:
  519. raise Exception("Disconnection event not seen")
  520. dev[0].request("REMOVE_NETWORK all")
  521. eap_connect(dev[0], apdev[0], "TTLS", "DOMAIN\mschapv2 user",
  522. anonymous_identity="ttls", password="password",
  523. ca_cert="hash://server/sha256/" + srv_cert_hash,
  524. phase2="auth=MSCHAPV2")
  525. def test_ap_wpa2_eap_pwd(dev, apdev):
  526. """WPA2-Enterprise connection using EAP-pwd"""
  527. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  528. hostapd.add_ap(apdev[0]['ifname'], params)
  529. eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password")
  530. eap_reauth(dev[0], "PWD")
  531. dev[0].request("REMOVE_NETWORK all")
  532. eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password",
  533. fragment_size="90")
  534. logger.info("Negative test with incorrect password")
  535. dev[0].request("REMOVE_NETWORK all")
  536. eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret-password",
  537. expect_failure=True, local_error_report=True)
  538. def test_ap_wpa2_eap_pwd_groups(dev, apdev):
  539. """WPA2-Enterprise connection using various EAP-pwd groups"""
  540. params = { "ssid": "test-wpa2-eap", "wpa": "2", "wpa_key_mgmt": "WPA-EAP",
  541. "rsn_pairwise": "CCMP", "ieee8021x": "1",
  542. "eap_server": "1", "eap_user_file": "auth_serv/eap_user.conf" }
  543. for i in [ 19, 20, 21, 25, 26 ]:
  544. params['pwd_group'] = str(i)
  545. hostapd.add_ap(apdev[0]['ifname'], params)
  546. dev[0].request("REMOVE_NETWORK all")
  547. eap_connect(dev[0], apdev[0], "PWD", "pwd user", password="secret password")
  548. def test_ap_wpa2_eap_gpsk(dev, apdev):
  549. """WPA2-Enterprise connection using EAP-GPSK"""
  550. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  551. hostapd.add_ap(apdev[0]['ifname'], params)
  552. id = eap_connect(dev[0], apdev[0], "GPSK", "gpsk user",
  553. password="abcdefghijklmnop0123456789abcdef")
  554. eap_reauth(dev[0], "GPSK")
  555. logger.info("Test forced algorithm selection")
  556. for phase1 in [ "cipher=1", "cipher=2" ]:
  557. dev[0].set_network_quoted(id, "phase1", phase1)
  558. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=10)
  559. if ev is None:
  560. raise Exception("EAP success timed out")
  561. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
  562. if ev is None:
  563. raise Exception("Association with the AP timed out")
  564. logger.info("Test failed algorithm negotiation")
  565. dev[0].set_network_quoted(id, "phase1", "cipher=9")
  566. ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"], timeout=10)
  567. if ev is None:
  568. raise Exception("EAP failure timed out")
  569. logger.info("Negative test with incorrect password")
  570. dev[0].request("REMOVE_NETWORK all")
  571. eap_connect(dev[0], apdev[0], "GPSK", "gpsk user",
  572. password="ffcdefghijklmnop0123456789abcdef",
  573. expect_failure=True)
  574. def test_ap_wpa2_eap_sake(dev, apdev):
  575. """WPA2-Enterprise connection using EAP-SAKE"""
  576. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  577. hostapd.add_ap(apdev[0]['ifname'], params)
  578. eap_connect(dev[0], apdev[0], "SAKE", "sake user",
  579. password_hex="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")
  580. eap_reauth(dev[0], "SAKE")
  581. logger.info("Negative test with incorrect password")
  582. dev[0].request("REMOVE_NETWORK all")
  583. eap_connect(dev[0], apdev[0], "SAKE", "sake user",
  584. password_hex="ff23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  585. expect_failure=True)
  586. def test_ap_wpa2_eap_eke(dev, apdev):
  587. """WPA2-Enterprise connection using EAP-EKE"""
  588. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  589. hostapd.add_ap(apdev[0]['ifname'], params)
  590. id = eap_connect(dev[0], apdev[0], "EKE", "eke user", password="hello")
  591. eap_reauth(dev[0], "EKE")
  592. logger.info("Test forced algorithm selection")
  593. for phase1 in [ "dhgroup=5 encr=1 prf=2 mac=2",
  594. "dhgroup=4 encr=1 prf=2 mac=2",
  595. "dhgroup=3 encr=1 prf=2 mac=2",
  596. "dhgroup=3 encr=1 prf=1 mac=1" ]:
  597. dev[0].set_network_quoted(id, "phase1", phase1)
  598. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=10)
  599. if ev is None:
  600. raise Exception("EAP success timed out")
  601. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
  602. if ev is None:
  603. raise Exception("Association with the AP timed out")
  604. logger.info("Test failed algorithm negotiation")
  605. dev[0].set_network_quoted(id, "phase1", "dhgroup=9 encr=9 prf=9 mac=9")
  606. ev = dev[0].wait_event(["CTRL-EVENT-EAP-FAILURE"], timeout=10)
  607. if ev is None:
  608. raise Exception("EAP failure timed out")
  609. logger.info("Negative test with incorrect password")
  610. dev[0].request("REMOVE_NETWORK all")
  611. eap_connect(dev[0], apdev[0], "EKE", "eke user", password="hello1",
  612. expect_failure=True)
  613. def test_ap_wpa2_eap_ikev2(dev, apdev):
  614. """WPA2-Enterprise connection using EAP-IKEv2"""
  615. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  616. hostapd.add_ap(apdev[0]['ifname'], params)
  617. eap_connect(dev[0], apdev[0], "IKEV2", "ikev2 user",
  618. password="ike password")
  619. eap_reauth(dev[0], "IKEV2")
  620. dev[0].request("REMOVE_NETWORK all")
  621. eap_connect(dev[0], apdev[0], "IKEV2", "ikev2 user",
  622. password="ike password", fragment_size="250")
  623. logger.info("Negative test with incorrect password")
  624. dev[0].request("REMOVE_NETWORK all")
  625. eap_connect(dev[0], apdev[0], "IKEV2", "ikev2 user",
  626. password="ike-password", expect_failure=True)
  627. def test_ap_wpa2_eap_pax(dev, apdev):
  628. """WPA2-Enterprise connection using EAP-PAX"""
  629. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  630. hostapd.add_ap(apdev[0]['ifname'], params)
  631. eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com",
  632. password_hex="0123456789abcdef0123456789abcdef")
  633. eap_reauth(dev[0], "PAX")
  634. logger.info("Negative test with incorrect password")
  635. dev[0].request("REMOVE_NETWORK all")
  636. eap_connect(dev[0], apdev[0], "PAX", "pax.user@example.com",
  637. password_hex="ff23456789abcdef0123456789abcdef",
  638. expect_failure=True)
  639. def test_ap_wpa2_eap_psk(dev, apdev):
  640. """WPA2-Enterprise connection using EAP-PSK"""
  641. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  642. params["wpa_key_mgmt"] = "WPA-EAP-SHA256"
  643. params["ieee80211w"] = "2"
  644. hostapd.add_ap(apdev[0]['ifname'], params)
  645. eap_connect(dev[0], apdev[0], "PSK", "psk.user@example.com",
  646. password_hex="0123456789abcdef0123456789abcdef", sha256=True)
  647. eap_reauth(dev[0], "PSK", sha256=True)
  648. logger.info("Negative test with incorrect password")
  649. dev[0].request("REMOVE_NETWORK all")
  650. eap_connect(dev[0], apdev[0], "PSK", "psk.user@example.com",
  651. password_hex="ff23456789abcdef0123456789abcdef", sha256=True,
  652. expect_failure=True)
  653. def test_ap_wpa_eap_peap_eap_mschapv2(dev, apdev):
  654. """WPA-Enterprise connection using EAP-PEAP/EAP-MSCHAPv2"""
  655. params = hostapd.wpa_eap_params(ssid="test-wpa-eap")
  656. hostapd.add_ap(apdev[0]['ifname'], params)
  657. dev[0].connect("test-wpa-eap", key_mgmt="WPA-EAP", eap="PEAP",
  658. identity="user", password="password", phase2="auth=MSCHAPV2",
  659. ca_cert="auth_serv/ca.pem", wait_connect=False,
  660. scan_freq="2412")
  661. eap_check_auth(dev[0], "PEAP", True, rsn=False)
  662. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  663. eap_reauth(dev[0], "PEAP", rsn=False)
  664. def test_ap_wpa2_eap_interactive(dev, apdev):
  665. """WPA2-Enterprise connection using interactive identity/password entry"""
  666. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  667. hostapd.add_ap(apdev[0]['ifname'], params)
  668. hapd = hostapd.Hostapd(apdev[0]['ifname'])
  669. tests = [ ("Connection with dynamic TTLS/MSCHAPv2 password entry",
  670. "TTLS", "ttls", "DOMAIN\mschapv2 user", "auth=MSCHAPV2",
  671. None, "password"),
  672. ("Connection with dynamic TTLS/MSCHAPv2 identity and password entry",
  673. "TTLS", "ttls", None, "auth=MSCHAPV2",
  674. "DOMAIN\mschapv2 user", "password"),
  675. ("Connection with dynamic TTLS/EAP-MSCHAPv2 password entry",
  676. "TTLS", "ttls", "user", "autheap=MSCHAPV2", None, "password"),
  677. ("Connection with dynamic TTLS/EAP-MD5 password entry",
  678. "TTLS", "ttls", "user", "autheap=MD5", None, "password"),
  679. ("Connection with dynamic PEAP/EAP-MSCHAPv2 password entry",
  680. "PEAP", None, "user", "auth=MSCHAPV2", None, "password"),
  681. ("Connection with dynamic PEAP/EAP-GTC password entry",
  682. "PEAP", None, "user", "auth=GTC", None, "password") ]
  683. for [desc,eap,anon,identity,phase2,req_id,req_pw] in tests:
  684. logger.info(desc)
  685. dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap=eap,
  686. anonymous_identity=anon, identity=identity,
  687. ca_cert="auth_serv/ca.pem", phase2=phase2,
  688. wait_connect=False, scan_freq="2412")
  689. if req_id:
  690. ev = dev[0].wait_event(["CTRL-REQ-IDENTITY"])
  691. if ev is None:
  692. raise Exception("Request for identity timed out")
  693. id = ev.split(':')[0].split('-')[-1]
  694. dev[0].request("CTRL-RSP-IDENTITY-" + id + ":" + req_id)
  695. ev = dev[0].wait_event(["CTRL-REQ-PASSWORD","CTRL-REQ-OTP"])
  696. if ev is None:
  697. raise Exception("Request for password timed out")
  698. id = ev.split(':')[0].split('-')[-1]
  699. type = "OTP" if "CTRL-REQ-OTP" in ev else "PASSWORD"
  700. dev[0].request("CTRL-RSP-" + type + "-" + id + ":" + req_pw)
  701. ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10)
  702. if ev is None:
  703. raise Exception("Connection timed out")
  704. dev[0].request("REMOVE_NETWORK all")
  705. def test_ap_wpa2_eap_vendor_test(dev, apdev):
  706. """WPA2-Enterprise connection using EAP vendor test"""
  707. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  708. hostapd.add_ap(apdev[0]['ifname'], params)
  709. eap_connect(dev[0], apdev[0], "VENDOR-TEST", "vendor-test")
  710. eap_reauth(dev[0], "VENDOR-TEST")
  711. def test_ap_wpa2_eap_fast_mschapv2_unauth_prov(dev, apdev):
  712. """WPA2-Enterprise connection using EAP-FAST/MSCHAPv2 and unauthenticated provisioning"""
  713. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  714. hostapd.add_ap(apdev[0]['ifname'], params)
  715. eap_connect(dev[0], apdev[0], "FAST", "user",
  716. anonymous_identity="FAST", password="password",
  717. ca_cert="auth_serv/ca.pem", phase2="auth=MSCHAPV2",
  718. phase1="fast_provisioning=1", pac_file="blob://fast_pac")
  719. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  720. eap_reauth(dev[0], "FAST")
  721. def test_ap_wpa2_eap_fast_gtc_auth_prov(dev, apdev):
  722. """WPA2-Enterprise connection using EAP-FAST/GTC and authenticated provisioning"""
  723. params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
  724. hostapd.add_ap(apdev[0]['ifname'], params)
  725. eap_connect(dev[0], apdev[0], "FAST", "user",
  726. anonymous_identity="FAST", password="password",
  727. ca_cert="auth_serv/ca.pem", phase2="auth=GTC",
  728. phase1="fast_provisioning=2", pac_file="blob://fast_pac_auth")
  729. hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])
  730. eap_reauth(dev[0], "FAST")