test_ieee8021x.py 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491
  1. # IEEE 802.1X tests
  2. # Copyright (c) 2013-2015, Jouni Malinen <j@w1.fi>
  3. #
  4. # This software may be distributed under the terms of the BSD license.
  5. # See README for more details.
  6. from remotehost import remote_compatible
  7. import binascii
  8. import hmac
  9. import logging
  10. import os
  11. import time
  12. import hostapd
  13. import hwsim_utils
  14. from utils import skip_with_fips
  15. from tshark import run_tshark
  16. logger = logging.getLogger()
  17. def test_ieee8021x_wep104(dev, apdev):
  18. """IEEE 802.1X connection using dynamic WEP104"""
  19. skip_with_fips(dev[0])
  20. params = hostapd.radius_params()
  21. params["ssid"] = "ieee8021x-wep"
  22. params["ieee8021x"] = "1"
  23. params["wep_key_len_broadcast"] = "13"
  24. params["wep_key_len_unicast"] = "13"
  25. hapd = hostapd.add_ap(apdev[0], params)
  26. dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
  27. identity="psk.user@example.com",
  28. password_hex="0123456789abcdef0123456789abcdef",
  29. scan_freq="2412")
  30. hwsim_utils.test_connectivity(dev[0], hapd)
  31. def test_ieee8021x_wep40(dev, apdev):
  32. """IEEE 802.1X connection using dynamic WEP40"""
  33. skip_with_fips(dev[0])
  34. params = hostapd.radius_params()
  35. params["ssid"] = "ieee8021x-wep"
  36. params["ieee8021x"] = "1"
  37. params["wep_key_len_broadcast"] = "5"
  38. params["wep_key_len_unicast"] = "5"
  39. hapd = hostapd.add_ap(apdev[0], params)
  40. dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
  41. identity="psk.user@example.com",
  42. password_hex="0123456789abcdef0123456789abcdef",
  43. scan_freq="2412")
  44. hwsim_utils.test_connectivity(dev[0], hapd)
  45. def test_ieee8021x_open(dev, apdev):
  46. """IEEE 802.1X connection using open network"""
  47. params = hostapd.radius_params()
  48. params["ssid"] = "ieee8021x-open"
  49. params["ieee8021x"] = "1"
  50. hapd = hostapd.add_ap(apdev[0], params)
  51. id = dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  52. eap="PSK", identity="psk.user@example.com",
  53. password_hex="0123456789abcdef0123456789abcdef",
  54. scan_freq="2412")
  55. hwsim_utils.test_connectivity(dev[0], hapd)
  56. logger.info("Test EAPOL-Logoff")
  57. dev[0].request("LOGOFF")
  58. ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"])
  59. if ev is None:
  60. raise Exception("Did not get disconnected")
  61. if "reason=23" not in ev:
  62. raise Exception("Unexpected disconnection reason")
  63. dev[0].request("LOGON")
  64. dev[0].connect_network(id)
  65. hwsim_utils.test_connectivity(dev[0], hapd)
  66. def test_ieee8021x_static_wep40(dev, apdev):
  67. """IEEE 802.1X connection using static WEP40"""
  68. run_static_wep(dev, apdev, '"hello"')
  69. def test_ieee8021x_static_wep104(dev, apdev):
  70. """IEEE 802.1X connection using static WEP104"""
  71. run_static_wep(dev, apdev, '"hello-there-/"')
  72. def run_static_wep(dev, apdev, key):
  73. params = hostapd.radius_params()
  74. params["ssid"] = "ieee8021x-wep"
  75. params["ieee8021x"] = "1"
  76. params["wep_key0"] = key
  77. hapd = hostapd.add_ap(apdev[0], params)
  78. dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="PSK",
  79. identity="psk.user@example.com",
  80. password_hex="0123456789abcdef0123456789abcdef",
  81. wep_key0=key, eapol_flags="0",
  82. scan_freq="2412")
  83. hwsim_utils.test_connectivity(dev[0], hapd)
  84. def test_ieee8021x_proto(dev, apdev):
  85. """IEEE 802.1X and EAPOL supplicant protocol testing"""
  86. params = hostapd.radius_params()
  87. params["ssid"] = "ieee8021x-open"
  88. params["ieee8021x"] = "1"
  89. hapd = hostapd.add_ap(apdev[0], params)
  90. bssid = apdev[0]['bssid']
  91. dev[1].request("SET ext_eapol_frame_io 1")
  92. dev[1].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  93. eap="PSK", identity="psk.user@example.com",
  94. password_hex="0123456789abcdef0123456789abcdef",
  95. scan_freq="2412", wait_connect=False)
  96. id = dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  97. eap="PSK", identity="psk.user@example.com",
  98. password_hex="0123456789abcdef0123456789abcdef",
  99. scan_freq="2412")
  100. ev = dev[1].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=5)
  101. start = dev[0].get_mib()
  102. tests = [ "11",
  103. "11223344",
  104. "020000050a93000501",
  105. "020300050a93000501",
  106. "0203002c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  107. "0203002c0100000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  108. "0203002c0100050000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  109. "02aa00050a93000501" ]
  110. for frame in tests:
  111. res = dev[0].request("EAPOL_RX " + bssid + " " + frame)
  112. if "OK" not in res:
  113. raise Exception("EAPOL_RX to wpa_supplicant failed")
  114. dev[1].request("EAPOL_RX " + bssid + " " + frame)
  115. stop = dev[0].get_mib()
  116. logger.info("MIB before test frames: " + str(start))
  117. logger.info("MIB after test frames: " + str(stop))
  118. vals = [ 'dot1xSuppInvalidEapolFramesRx',
  119. 'dot1xSuppEapLengthErrorFramesRx' ]
  120. for val in vals:
  121. if int(stop[val]) <= int(start[val]):
  122. raise Exception(val + " did not increase")
  123. @remote_compatible
  124. def test_ieee8021x_eapol_start(dev, apdev):
  125. """IEEE 802.1X and EAPOL-Start retransmissions"""
  126. params = hostapd.radius_params()
  127. params["ssid"] = "ieee8021x-open"
  128. params["ieee8021x"] = "1"
  129. hapd = hostapd.add_ap(apdev[0], params)
  130. bssid = apdev[0]['bssid']
  131. addr0 = dev[0].own_addr()
  132. hapd.set("ext_eapol_frame_io", "1")
  133. try:
  134. dev[0].request("SET EAPOL::startPeriod 1")
  135. dev[0].request("SET EAPOL::maxStart 1")
  136. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  137. eap="PSK", identity="psk.user@example.com",
  138. password_hex="0123456789abcdef0123456789abcdef",
  139. scan_freq="2412", wait_connect=False)
  140. held = False
  141. for i in range(30):
  142. pae = dev[0].get_status_field('Supplicant PAE state')
  143. if pae == "HELD":
  144. mib = hapd.get_sta(addr0, info="eapol")
  145. if mib['auth_pae_state'] != 'AUTHENTICATING':
  146. raise Exception("Unexpected Auth PAE state: " + mib['auth_pae_state'])
  147. held = True
  148. break
  149. time.sleep(0.25)
  150. if not held:
  151. raise Exception("PAE state HELD not reached")
  152. dev[0].wait_disconnected()
  153. finally:
  154. dev[0].request("SET EAPOL::startPeriod 30")
  155. dev[0].request("SET EAPOL::maxStart 3")
  156. def test_ieee8021x_held(dev, apdev):
  157. """IEEE 802.1X and HELD state"""
  158. params = hostapd.radius_params()
  159. params["ssid"] = "ieee8021x-open"
  160. params["ieee8021x"] = "1"
  161. hapd = hostapd.add_ap(apdev[0], params)
  162. bssid = apdev[0]['bssid']
  163. hapd.set("ext_eapol_frame_io", "1")
  164. try:
  165. dev[0].request("SET EAPOL::startPeriod 1")
  166. dev[0].request("SET EAPOL::maxStart 0")
  167. dev[0].request("SET EAPOL::heldPeriod 1")
  168. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  169. eap="PSK", identity="psk.user@example.com",
  170. password_hex="0123456789abcdef0123456789abcdef",
  171. scan_freq="2412", wait_connect=False)
  172. held = False
  173. for i in range(30):
  174. pae = dev[0].get_status_field('Supplicant PAE state')
  175. if pae == "HELD":
  176. held = True
  177. break
  178. time.sleep(0.25)
  179. if not held:
  180. raise Exception("PAE state HELD not reached")
  181. hapd.set("ext_eapol_frame_io", "0")
  182. for i in range(30):
  183. pae = dev[0].get_status_field('Supplicant PAE state')
  184. if pae != "HELD":
  185. held = False
  186. break
  187. time.sleep(0.25)
  188. if held:
  189. raise Exception("PAE state HELD not left")
  190. ev = dev[0].wait_event([ "CTRL-EVENT-CONNECTED",
  191. "CTRL-EVENT-DISCONNECTED" ], timeout=10)
  192. if ev is None:
  193. raise Exception("Connection timed out")
  194. if "CTRL-EVENT-DISCONNECTED" in ev:
  195. raise Exception("Unexpected disconnection")
  196. finally:
  197. dev[0].request("SET EAPOL::startPeriod 30")
  198. dev[0].request("SET EAPOL::maxStart 3")
  199. dev[0].request("SET EAPOL::heldPeriod 60")
  200. def send_eapol_key(dev, bssid, signkey, frame_start, frame_end):
  201. zero_sign = "00000000000000000000000000000000"
  202. frame = frame_start + zero_sign + frame_end
  203. hmac_obj = hmac.new(binascii.unhexlify(signkey))
  204. hmac_obj.update(binascii.unhexlify(frame))
  205. sign = hmac_obj.digest()
  206. frame = frame_start + binascii.hexlify(sign) + frame_end
  207. dev.request("EAPOL_RX " + bssid + " " + frame)
  208. def test_ieee8021x_eapol_key(dev, apdev):
  209. """IEEE 802.1X connection and EAPOL-Key protocol tests"""
  210. skip_with_fips(dev[0])
  211. params = hostapd.radius_params()
  212. params["ssid"] = "ieee8021x-wep"
  213. params["ieee8021x"] = "1"
  214. params["wep_key_len_broadcast"] = "5"
  215. params["wep_key_len_unicast"] = "5"
  216. hapd = hostapd.add_ap(apdev[0], params)
  217. bssid = apdev[0]['bssid']
  218. dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X", eap="VENDOR-TEST",
  219. identity="vendor-test", scan_freq="2412")
  220. # Hardcoded MSK from VENDOR-TEST
  221. encrkey = "1111111111111111111111111111111111111111111111111111111111111111"
  222. signkey = "2222222222222222222222222222222222222222222222222222222222222222"
  223. # EAPOL-Key replay counter does not increase
  224. send_eapol_key(dev[0], bssid, signkey,
  225. "02030031" + "010005" + "0000000000000000" + "056c22d109f29d4d9fb9b9ccbad33283" + "02",
  226. "1c636a30a4")
  227. # EAPOL-Key too large Key Length field value
  228. send_eapol_key(dev[0], bssid, signkey,
  229. "02030031" + "010021" + "ffffffffffffffff" + "056c22d109f29d4d9fb9b9ccbad33283" + "02",
  230. "1c636a30a4")
  231. # EAPOL-Key too much key data
  232. send_eapol_key(dev[0], bssid, signkey,
  233. "0203004d" + "010005" + "ffffffffffffffff" + "056c22d109f29d4d9fb9b9ccbad33283" + "02",
  234. 33*"ff")
  235. # EAPOL-Key too little key data
  236. send_eapol_key(dev[0], bssid, signkey,
  237. "02030030" + "010005" + "ffffffffffffffff" + "056c22d109f29d4d9fb9b9ccbad33283" + "02",
  238. "1c636a30")
  239. # EAPOL-Key with no key data and too long WEP key length
  240. send_eapol_key(dev[0], bssid, signkey,
  241. "0203002c" + "010020" + "ffffffffffffffff" + "056c22d109f29d4d9fb9b9ccbad33283" + "02",
  242. "")
  243. def test_ieee8021x_reauth(dev, apdev):
  244. """IEEE 802.1X and EAPOL_REAUTH request"""
  245. params = hostapd.radius_params()
  246. params["ssid"] = "ieee8021x-open"
  247. params["ieee8021x"] = "1"
  248. hapd = hostapd.add_ap(apdev[0], params)
  249. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  250. eap="PSK", identity="psk.user@example.com",
  251. password_hex="0123456789abcdef0123456789abcdef",
  252. scan_freq="2412")
  253. hapd.request("EAPOL_REAUTH " + dev[0].own_addr())
  254. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=5)
  255. if ev is None:
  256. raise Exception("EAP authentication did not start")
  257. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=5)
  258. if ev is None:
  259. raise Exception("EAP authentication did not succeed")
  260. time.sleep(0.1)
  261. hwsim_utils.test_connectivity(dev[0], hapd)
  262. def test_ieee8021x_reauth_wep(dev, apdev, params):
  263. """IEEE 802.1X and EAPOL_REAUTH request with WEP"""
  264. logdir = params['logdir']
  265. params = hostapd.radius_params()
  266. params["ssid"] = "ieee8021x-open"
  267. params["ieee8021x"] = "1"
  268. params["wep_key_len_broadcast"] = "13"
  269. params["wep_key_len_unicast"] = "13"
  270. hapd = hostapd.add_ap(apdev[0], params)
  271. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X",
  272. eap="PSK", identity="psk.user@example.com",
  273. password_hex="0123456789abcdef0123456789abcdef",
  274. scan_freq="2412")
  275. hwsim_utils.test_connectivity(dev[0], hapd)
  276. hapd.request("EAPOL_REAUTH " + dev[0].own_addr())
  277. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=5)
  278. if ev is None:
  279. raise Exception("EAP authentication did not start")
  280. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=5)
  281. if ev is None:
  282. raise Exception("EAP authentication did not succeed")
  283. time.sleep(0.1)
  284. hwsim_utils.test_connectivity(dev[0], hapd)
  285. out = run_tshark(os.path.join(logdir, "hwsim0.pcapng"),
  286. "llc.type == 0x888e", ["eapol.type", "eap.code"])
  287. if out is None:
  288. raise Exception("Could not find EAPOL frames in capture")
  289. num_eapol_key = 0
  290. num_eap_req = 0
  291. num_eap_resp = 0
  292. for line in out.splitlines():
  293. vals = line.split()
  294. if vals[0] == '3':
  295. num_eapol_key += 1
  296. if vals[0] == '0' and len(vals) == 2:
  297. if vals[1] == '1':
  298. num_eap_req += 1
  299. elif vals[1] == '2':
  300. num_eap_resp += 1
  301. logger.info("num_eapol_key: %d" % num_eapol_key)
  302. logger.info("num_eap_req: %d" % num_eap_req)
  303. logger.info("num_eap_resp: %d" % num_eap_resp)
  304. if num_eapol_key < 4:
  305. raise Exception("Did not see four unencrypted EAPOL-Key frames")
  306. if num_eap_req < 6:
  307. raise Exception("Did not see six unencrypted EAP-Request frames")
  308. if num_eap_resp < 6:
  309. raise Exception("Did not see six unencrypted EAP-Response frames")
  310. def test_ieee8021x_set_conf(dev, apdev):
  311. """IEEE 802.1X and EAPOL_SET command"""
  312. params = hostapd.radius_params()
  313. params["ssid"] = "ieee8021x-open"
  314. params["ieee8021x"] = "1"
  315. hapd = hostapd.add_ap(apdev[0], params)
  316. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  317. eap="PSK", identity="psk.user@example.com",
  318. password_hex="0123456789abcdef0123456789abcdef",
  319. scan_freq="2412")
  320. addr0 = dev[0].own_addr()
  321. tests = [ "EAPOL_SET 1",
  322. "EAPOL_SET %sfoo bar" % addr0,
  323. "EAPOL_SET %s foo" % addr0,
  324. "EAPOL_SET %s foo bar" % addr0,
  325. "EAPOL_SET %s AdminControlledDirections bar" % addr0,
  326. "EAPOL_SET %s AdminControlledPortControl bar" % addr0,
  327. "EAPOL_SET %s reAuthEnabled bar" % addr0,
  328. "EAPOL_SET %s KeyTransmissionEnabled bar" % addr0,
  329. "EAPOL_SET 11:22:33:44:55:66 AdminControlledDirections Both" ]
  330. for t in tests:
  331. if "FAIL" not in hapd.request(t):
  332. raise Exception("Invalid EAPOL_SET command accepted: " + t)
  333. tests = [ ("AdminControlledDirections", "adminControlledDirections", "In"),
  334. ("AdminControlledDirections", "adminControlledDirections",
  335. "Both"),
  336. ("quietPeriod", "quietPeriod", "13"),
  337. ("serverTimeout", "serverTimeout", "7"),
  338. ("reAuthPeriod", "reAuthPeriod", "1234"),
  339. ("reAuthEnabled", "reAuthEnabled", "FALSE"),
  340. ("reAuthEnabled", "reAuthEnabled", "TRUE"),
  341. ("KeyTransmissionEnabled", "keyTxEnabled", "TRUE"),
  342. ("KeyTransmissionEnabled", "keyTxEnabled", "FALSE"),
  343. ("AdminControlledPortControl", "portControl", "ForceAuthorized"),
  344. ("AdminControlledPortControl", "portControl",
  345. "ForceUnauthorized"),
  346. ("AdminControlledPortControl", "portControl", "Auto") ]
  347. for param,mibparam,val in tests:
  348. if "OK" not in hapd.request("EAPOL_SET %s %s %s" % (addr0, param, val)):
  349. raise Exception("Failed to set %s %s" % (param, val))
  350. mib = hapd.get_sta(addr0, info="eapol")
  351. if mib[mibparam] != val:
  352. raise Exception("Unexpected %s value: %s (expected %s)" % (param, mib[mibparam], val))
  353. ev = dev[0].wait_event(["CTRL-EVENT-EAP-SUCCESS"], timeout=5)
  354. if ev is None:
  355. raise Exception("EAP authentication did not succeed")
  356. time.sleep(0.1)
  357. hwsim_utils.test_connectivity(dev[0], hapd)
  358. def test_ieee8021x_auth_awhile(dev, apdev):
  359. """IEEE 802.1X and EAPOL Authenticator aWhile handling"""
  360. params = hostapd.radius_params()
  361. params["ssid"] = "ieee8021x-open"
  362. params["ieee8021x"] = "1"
  363. params['auth_server_port'] = "18129"
  364. hapd = hostapd.add_ap(apdev[0], params)
  365. bssid = apdev[0]['bssid']
  366. addr0 = dev[0].own_addr()
  367. params = {}
  368. params['ssid'] = 'as'
  369. params['beacon_int'] = '2000'
  370. params['radius_server_clients'] = 'auth_serv/radius_clients.conf'
  371. params['radius_server_auth_port'] = '18129'
  372. params['eap_server'] = '1'
  373. params['eap_user_file'] = 'auth_serv/eap_user.conf'
  374. params['ca_cert'] = 'auth_serv/ca.pem'
  375. params['server_cert'] = 'auth_serv/server.pem'
  376. params['private_key'] = 'auth_serv/server.key'
  377. hapd1 = hostapd.add_ap(apdev[1], params)
  378. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  379. eap="PSK", identity="psk.user@example.com",
  380. password_hex="0123456789abcdef0123456789abcdef",
  381. scan_freq="2412")
  382. hapd1.disable()
  383. if "OK" not in hapd.request("EAPOL_SET %s serverTimeout 1" % addr0):
  384. raise Exception("Failed to set serverTimeout")
  385. hapd.request("EAPOL_REAUTH " + dev[0].own_addr())
  386. ev = dev[0].wait_event(["CTRL-EVENT-EAP-STARTED"], timeout=5)
  387. for i in range(40):
  388. mib = hapd.get_sta(addr0, info="eapol")
  389. val = int(mib['aWhile'])
  390. if val > 0:
  391. break
  392. time.sleep(1)
  393. if val == 0:
  394. raise Exception("aWhile did not increase")
  395. hapd.dump_monitor()
  396. for i in range(40):
  397. mib = hapd.get_sta(addr0, info="eapol")
  398. val = int(mib['aWhile'])
  399. if val < 5:
  400. break
  401. time.sleep(1)
  402. ev = hapd.wait_event(["CTRL-EVENT-EAP-PROPOSED"], timeout=10)
  403. if ev is None:
  404. raise Exception("Authentication restart not seen")
  405. def test_ieee8021x_open_leap(dev, apdev):
  406. """IEEE 802.1X connection with LEAP included in configuration"""
  407. params = hostapd.radius_params()
  408. params["ssid"] = "ieee8021x-open"
  409. params["ieee8021x"] = "1"
  410. hapd = hostapd.add_ap(apdev[0], params)
  411. dev[1].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  412. eap="LEAP", identity="psk.user@example.com",
  413. password_hex="0123456789abcdef0123456789abcdef",
  414. scan_freq="2412", wait_connect=False)
  415. dev[0].connect("ieee8021x-open", key_mgmt="IEEE8021X", eapol_flags="0",
  416. eap="PSK LEAP", identity="psk.user@example.com",
  417. password_hex="0123456789abcdef0123456789abcdef",
  418. scan_freq="2412")
  419. ev = dev[1].wait_event(["CTRL-EVENT-AUTH-REJECT"], timeout=5)
  420. dev[1].request("DISCONNECT")
  421. def test_ieee8021x_and_wpa_enabled(dev, apdev):
  422. """IEEE 802.1X connection using dynamic WEP104 when WPA enabled"""
  423. skip_with_fips(dev[0])
  424. params = hostapd.radius_params()
  425. params["ssid"] = "ieee8021x-wep"
  426. params["ieee8021x"] = "1"
  427. params["wep_key_len_broadcast"] = "13"
  428. params["wep_key_len_unicast"] = "13"
  429. hapd = hostapd.add_ap(apdev[0], params)
  430. dev[0].connect("ieee8021x-wep", key_mgmt="IEEE8021X WPA-EAP", eap="PSK",
  431. identity="psk.user@example.com",
  432. password_hex="0123456789abcdef0123456789abcdef",
  433. scan_freq="2412")
  434. hwsim_utils.test_connectivity(dev[0], hapd)