commit f0a890da8a3cf942fb3013496c7972d152ff1d5e parent c21dc9ed6fec68e70a779bd9457419736f90e726 Author: James Prestwood <prestwoj@gmail.com> Date: Tue, 17 Aug 2021 09:45:00 -0700 auto-t: remove duplicate EAP tests This removes any EAP test which was combined into testEAP as well as modifies any special EAP test to use the now global eap-users file. Diffstat:
147 files changed, 37 insertions(+), 2194 deletions(-)
diff --git a/autotests/misc/certs/eap-user-tls.text b/autotests/misc/certs/eap-user-tls.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TLS -# Phase 2 -"abc@example.com" MD5 "testpasswd" [2] diff --git a/autotests/misc/certs/eap-user-ttls-mschapv2.text b/autotests/misc/certs/eap-user-ttls-mschapv2.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"user" MSCHAPV2 "testpasswd" [2] diff --git a/autotests/misc/certs/eap-user-ttls.text b/autotests/misc/certs/eap-user-ttls.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"abc@example.com" MD5 "testpasswd" [2] diff --git a/autotests/misc/secrets/eap-user-mschapv2.text b/autotests/misc/secrets/eap-user-mschapv2.text @@ -1 +0,0 @@ -"domain\User" MSCHAPV2 "Password" diff --git a/autotests/misc/secrets/eap-user-peap-mschapv2.text b/autotests/misc/secrets/eap-user-peap-mschapv2.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP -# Phase 2 -"domain\User" MSCHAPV2 "Password" [2] diff --git a/autotests/misc/secrets/eap-user-peap-sim.text b/autotests/misc/secrets/eap-user-peap-sim.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP -# Phase 2 -"112345678@phonesim.org" SIM [2] diff --git a/autotests/misc/secrets/eap-user-peap-v0-mschapv2.text b/autotests/misc/secrets/eap-user-peap-v0-mschapv2.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP [ver=0] -# Phase 2 -"secure@identity.com" MSCHAPV2 "testpasswd" [2] diff --git a/autotests/misc/secrets/eap-user-peap-v0.text b/autotests/misc/secrets/eap-user-peap-v0.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP [ver=0] -# Phase 2 -"secure@identity.com" MD5 "testpasswd" [2] diff --git a/autotests/misc/secrets/eap-user-peap-v1.text b/autotests/misc/secrets/eap-user-peap-v1.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP [ver=1] -# Phase 2 -"secure@identity.com" MD5 "testpasswd" [2] diff --git a/autotests/testConnectAutoconnect/ssidEAP-Other.conf b/autotests/testConnectAutoconnect/ssidEAP-Other.conf @@ -6,7 +6,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-ttls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testConnectAutoconnect/ssidEAP-TLS.8021x b/autotests/testConnectAutoconnect/ssidEAP-TLS.8021x @@ -3,4 +3,4 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com diff --git a/autotests/testConnectAutoconnect/ssidEAP-TLS.conf b/autotests/testConnectAutoconnect/ssidEAP-TLS.conf @@ -6,7 +6,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAD/default.8021x b/autotests/testEAD/default.8021x @@ -1,6 +1,6 @@ [Security] EAP-Method=MSCHAPV2 -EAP-Identity=domain\\User +EAP-Identity=mschapv2@example.com EAP-Password=Password [Settings] diff --git a/autotests/testEAD/wired.conf b/autotests/testEAD/wired.conf @@ -13,5 +13,5 @@ nas_identifier=ap.example.com radius_server_clients=/tmp/certs/radius-clients.text radius_server_auth_port=1812 -eap_user_file=/tmp/secrets/eap-user-mschapv2.text +eap_user_file=/tmp/secrets/eap-user.text eap_server=1 diff --git a/autotests/testEAP-AKA-ofono/connection_test.py b/autotests/testEAP-AKA-ofono/connection_test.py @@ -1,59 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from hlrauc import AuthCenter -from ofono import Ofono -from config import ctx - -class Test(unittest.TestCase): - def test_connection_success(self): - ofono = Ofono() - ofono.enable_modem('/phonesim') - ofono.wait_for_sim_auth() - - wd = IWD() - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-AKA') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - @classmethod - def setUpClass(cls): - if not ctx.is_process_running('ofonod'): - cls.skipTest(cls, "ofono not running") - - IWD.copy_to_storage('ssidEAP-AKA.8021x') - - cls.auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - - cls.auth.stop() - cls.auth = None - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-AKA-ofono/hw.conf b/autotests/testEAP-AKA-ofono/hw.conf @@ -1,6 +0,0 @@ -[SETUP] -num_radios=2 -sim_keys=ofono - -[HOSTAPD] -rad0=ssidEAP-AKA.conf diff --git a/autotests/testEAP-AKA-ofono/sim.db b/autotests/testEAP-AKA-ofono/sim.db @@ -1,3 +0,0 @@ -# IMSI K OPC AMF SQN - -12345678:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021 -\ No newline at end of file diff --git a/autotests/testEAP-AKA-ofono/sim.eap_user b/autotests/testEAP-AKA-ofono/sim.eap_user @@ -1 +0,0 @@ -"012345678@phonesim.org" AKA diff --git a/autotests/testEAP-AKA-ofono/ssidEAP-AKA.8021x b/autotests/testEAP-AKA-ofono/ssidEAP-AKA.8021x @@ -1,5 +0,0 @@ -[Security] -EAP-Method=AKA - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-AKA-ofono/ssidEAP-AKA.conf b/autotests/testEAP-AKA-ofono/ssidEAP-AKA.conf @@ -1,16 +0,0 @@ -hw_mode=g -channel=1 - -driver=nl80211 -ieee8021x=1 -eap_server=1 -ssid=ssidEAP-AKA -eap_user_file=/tmp/sim.eap_user -eap_sim_db=unix:/tmp/hlrauc.sock -wpa=2 -wpa_key_mgmt=WPA-EAP -wpa_pairwise=TKIP CCMP -rsn_pairwise=CCMP TKIP -wpa_passphrase=secret123 -channel=1 -eap_sim_aka_result_ind=1 diff --git a/autotests/testEAP-AKA-prime-ofono/connection_test.py b/autotests/testEAP-AKA-prime-ofono/connection_test.py @@ -1,58 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from hlrauc import AuthCenter -from ofono import Ofono -from config import ctx - -class Test(unittest.TestCase): - def test_connection_success(self): - ofono = Ofono() - ofono.enable_modem('/phonesim') - ofono.wait_for_sim_auth() - - wd = IWD() - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-AKA') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - @classmethod - def setUpClass(cls): - if not ctx.is_process_running('ofonod'): - cls.skipTest(cls, "ofono not running") - - IWD.copy_to_storage('ssidEAP-AKA.8021x') - - cls.auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - cls.auth.stop() - cls.auth = None - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-AKA-prime-ofono/hw.conf b/autotests/testEAP-AKA-prime-ofono/hw.conf @@ -1,6 +0,0 @@ -[SETUP] -num_radios=2 -sim_keys=ofono - -[HOSTAPD] -rad0=ssidEAP-AKA.conf diff --git a/autotests/testEAP-AKA-prime-ofono/sim.db b/autotests/testEAP-AKA-prime-ofono/sim.db @@ -1,3 +0,0 @@ -# IMSI K OPC AMF SQN - -12345678:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021 -\ No newline at end of file diff --git a/autotests/testEAP-AKA-prime-ofono/sim.eap_user b/autotests/testEAP-AKA-prime-ofono/sim.eap_user @@ -1 +0,0 @@ -"612345678@phonesim.org" AKA' -\ No newline at end of file diff --git a/autotests/testEAP-AKA-prime-ofono/ssidEAP-AKA.8021x b/autotests/testEAP-AKA-prime-ofono/ssidEAP-AKA.8021x @@ -1,5 +0,0 @@ -[Security] -EAP-Method=AKA' - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-AKA-prime-ofono/ssidEAP-AKA.conf b/autotests/testEAP-AKA-prime-ofono/ssidEAP-AKA.conf @@ -1,16 +0,0 @@ -hw_mode=g -channel=1 - -driver=nl80211 -ieee8021x=1 -eap_server=1 -ssid=ssidEAP-AKA -eap_user_file=/tmp/sim.eap_user -eap_sim_db=unix:/tmp/hlrauc.sock -wpa=2 -wpa_key_mgmt=WPA-EAP -wpa_pairwise=TKIP CCMP -rsn_pairwise=CCMP TKIP -wpa_passphrase=secret123 -channel=1 -eap_sim_aka_result_ind=1 diff --git a/autotests/testEAP-MSCHAPV2/connection_test.py b/autotests/testEAP-MSCHAPV2/connection_test.py @@ -1,76 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def run_connection_test(self, *secrets): - wd = IWD() - - psk_agent = iwd.PSKAgent(*secrets) - wd.register_psk_agent(psk_agent) - - devices = wd.list_devices(1) - device = devices[0] - - condition = 'not obj.scanning' - wd.wait_for_object_condition(device, condition) - - if not device.get_ordered_networks(): - device.scan() - condition = 'obj.scanning' - wd.wait_for_object_condition(device, condition) - condition = 'not obj.scanning' - wd.wait_for_object_condition(device, condition) - - ordered_network = device.get_ordered_network("ssidEAP-MSCHAPV2") - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - wd.unregister_psk_agent(psk_agent) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_agent_none(self): - IWD.copy_to_storage('ssidEAP-MSCHAPV2-1.8021x', name='ssidEAP-MSCHAPV2.8021x') - self.run_connection_test() - - def test_agent_none_hash(self): - IWD.copy_to_storage('ssidEAP-MSCHAPV2-2.8021x', name='ssidEAP-MSCHAPV2.8021x') - self.run_connection_test() - - def test_agent_passwd(self): - IWD.copy_to_storage('ssidEAP-MSCHAPV2-3.8021x', name='ssidEAP-MSCHAPV2.8021x') - self.run_connection_test([], ('domain\\User', 'Password')) - - def test_agent_username_and_passwd(self): - IWD.copy_to_storage('ssidEAP-MSCHAPV2-4.8021x', name='ssidEAP-MSCHAPV2.8021x') - self.run_connection_test([], ('domain\\User', 'Password')) - - @classmethod - def setUpClass(cls): - pass - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-MSCHAPV2/hw.conf b/autotests/testEAP-MSCHAPV2/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-MSCHAPV2.conf diff --git a/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-1.8021x b/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-1.8021x @@ -1,7 +0,0 @@ -[Security] -EAP-Method=MSCHAPV2 -EAP-Identity=domain\\User -EAP-Password=Password - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-2.8021x b/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-2.8021x @@ -1,7 +0,0 @@ -[Security] -EAP-Method=MSCHAPV2 -EAP-Identity=domain\\User -EAP-Password-Hash=a4f49c406510bdcab6824ee7c30fd852 - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-3.8021x b/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-3.8021x @@ -1,6 +0,0 @@ -[Security] -EAP-Method=MSCHAPV2 -EAP-Identity=domain\\User - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-4.8021x b/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2-4.8021x @@ -1,5 +0,0 @@ -[Security] -EAP-Method=MSCHAPV2 - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2.conf b/autotests/testEAP-MSCHAPV2/ssidEAP-MSCHAPV2.conf @@ -1,9 +0,0 @@ -ssid=ssidEAP-MSCHAPV2 -interface=wln0 -hw_mode=g -channel=1 -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-mschapv2.text diff --git a/autotests/testEAP-PEAP-GTC/eap-user-peap-gtc.text b/autotests/testEAP-PEAP-GTC/eap-user-peap-gtc.text @@ -1,4 +0,0 @@ -# Phase 1 users -* PEAP [ver=1] -# Phase 2 -"secure@identity.com" GTC "testpasswd" [2] diff --git a/autotests/testEAP-PEAP-GTC/hw.conf b/autotests/testEAP-PEAP-GTC/hw.conf @@ -1,7 +0,0 @@ -[SETUP] -num_radios=3 -start_iwd=0 - -[HOSTAPD] -rad0=ssidEAP-PEAPv1-GTC.conf -rad1=ssidEAP-PEAPv1-GTC-nosecret.conf diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_nosecret_test.py @@ -1,59 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from iwd import PSKAgent - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC-nosecret') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True) - - psk_agent = PSKAgent('secure@identity.com', - ('secure@identity.com', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - try: - self.validate_connection(wd) - finally: - wd.unregister_psk_agent(psk_agent) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAPv1-GTC-nosecret.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP-GTC/peap_gtc_test.py b/autotests/testEAP-PEAP-GTC/peap_gtc_test.py @@ -1,51 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAPv1-GTC') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAPv1-GTC.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC-nosecret.8021x b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC-nosecret.8021x @@ -1,11 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=GTC -EAP-PEAP-Phase2-Identity=secure@identity.com - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC-nosecret.conf b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC-nosecret.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAPv1-GTC-nosecret - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-peap-gtc.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.8021x b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=GTC -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.conf b/autotests/testEAP-PEAP-GTC/ssidEAP-PEAPv1-GTC.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAPv1-GTC - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-peap-gtc.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py b/autotests/testEAP-PEAP-MSCHAPv2/connection_test.py @@ -1,52 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from hlrauc import AuthCenter - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAP-MSCHAPv2') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAP-MSCHAPv2.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP-MSCHAPv2/hw.conf b/autotests/testEAP-PEAP-MSCHAPv2/hw.conf @@ -1,6 +0,0 @@ -[SETUP] -num_radios=2 -start_iwd=0 - -[HOSTAPD] -rad0=ssidEAP-PEAP-MSCHAPv2.conf diff --git a/autotests/testEAP-PEAP-MSCHAPv2/ssidEAP-PEAP-MSCHAPv2.8021x b/autotests/testEAP-PEAP-MSCHAPv2/ssidEAP-PEAP-MSCHAPv2.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=MSCHAPV2 -EAP-PEAP-Phase2-Identity=domain\\User -EAP-PEAP-Phase2-Password=Password - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP-MSCHAPv2/ssidEAP-PEAP-MSCHAPv2.conf b/autotests/testEAP-PEAP-MSCHAPv2/ssidEAP-PEAP-MSCHAPv2.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAP-MSCHAPv2 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-mschapv2.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAP-SIM/connection_test.py b/autotests/testEAP-PEAP-SIM/connection_test.py @@ -1,65 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from hlrauc import AuthCenter -from ofono import Ofono -from config import ctx - -class Test(unittest.TestCase): - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAP-SIM') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - - def test_connection_success(self): - ofono = Ofono() - ofono.enable_modem('/phonesim') - ofono.wait_for_sim_auth() - - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - if not ctx.is_process_running('ofonod'): - cls.skipTest(cls, "ofono not running") - - cls.auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db') - - IWD.copy_to_storage('ssidEAP-PEAP-SIM.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - - cls.auth.stop() - cls.auth = None - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP-SIM/hw.conf b/autotests/testEAP-PEAP-SIM/hw.conf @@ -1,7 +0,0 @@ -[SETUP] -num_radios=2 -start_iwd=0 -sim_keys=ofono - -[HOSTAPD] -rad0=ssidEAP-PEAP-SIM.conf diff --git a/autotests/testEAP-PEAP-SIM/sim.db b/autotests/testEAP-PEAP-SIM/sim.db @@ -1 +0,0 @@ -12345678:673fb8cd35f98800:1fb1e3b5:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD diff --git a/autotests/testEAP-PEAP-SIM/sim.eap_user b/autotests/testEAP-PEAP-SIM/sim.eap_user @@ -1 +0,0 @@ -"112345678@phonesim.org" SIM diff --git a/autotests/testEAP-PEAP-SIM/ssidEAP-PEAP-SIM.8021x b/autotests/testEAP-PEAP-SIM/ssidEAP-PEAP-SIM.8021x @@ -1,10 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@example.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=SIM - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP-SIM/ssidEAP-PEAP-SIM.conf b/autotests/testEAP-PEAP-SIM/ssidEAP-PEAP-SIM.conf @@ -1,15 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAP-SIM - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-sim.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem - -eap_sim_db=unix:/tmp/hlrauc.sock -eap_sim_aka_result_ind=1 diff --git a/autotests/testEAP-PEAP/IWD-Frag/main.conf b/autotests/testEAP-PEAP/IWD-Frag/main.conf @@ -1,2 +0,0 @@ -[EAP] -MTU=100 diff --git a/autotests/testEAP-PEAP/hw.conf b/autotests/testEAP-PEAP/hw.conf @@ -1,8 +0,0 @@ -[SETUP] -num_radios=4 -start_iwd=0 - -[HOSTAPD] -rad0=ssidEAP-PEAPv1.conf -rad1=ssidEAP-PEAPv0.conf -rad2=ssidEAP-PEAP-frag.conf diff --git a/autotests/testEAP-PEAP/peap_frag_test.py b/autotests/testEAP-PEAP/peap_frag_test.py @@ -1,50 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAP-frag') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True, '/tmp/IWD-Frag') - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAP-frag.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP/peap_v0_test.py b/autotests/testEAP-PEAP/peap_v0_test.py @@ -1,50 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAPv0') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAPv0.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP/peap_v1_test.py b/autotests/testEAP-PEAP/peap_v1_test.py @@ -1,50 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys -import time - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PEAPv1') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PEAPv1.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAP-frag.8021x b/autotests/testEAP-PEAP/ssidEAP-PEAP-frag.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=MD5 -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAP-frag.conf b/autotests/testEAP-PEAP/ssidEAP-PEAP-frag.conf @@ -1,14 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAP-frag - -fragment_size=256 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-v1.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAPv0.8021x b/autotests/testEAP-PEAP/ssidEAP-PEAPv0.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=MD5 -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAPv0.conf b/autotests/testEAP-PEAP/ssidEAP-PEAPv0.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAPv0 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-v0.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAPv1.8021x b/autotests/testEAP-PEAP/ssidEAP-PEAPv1.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=PEAP -EAP-Identity=open@identity.com -EAP-PEAP-CACert=/tmp/certs/cert-ca.pem -EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem -EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-PEAP-Phase2-Method=MD5 -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PEAP/ssidEAP-PEAPv1.conf b/autotests/testEAP-PEAP/ssidEAP-PEAPv1.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-PEAPv1 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-v1.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-ISK.8021x b/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-ISK.8021x @@ -1,12 +1,12 @@ [Security] EAP-Method=PEAP -EAP-Identity=open@identity.com +EAP-Identity=peapv0@example.com EAP-PEAP-CACert=/tmp/certs/cert-ca.pem EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem EAP-PEAP-Phase2-Method=MSCHAPV2 -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd +EAP-PEAP-Phase2-Identity=mschapv2-phase2@example.com +EAP-PEAP-Phase2-Password=Password [Settings] AutoConnect=false diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-ISK.conf b/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-ISK.conf @@ -6,7 +6,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-v0-mschapv2.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-NoISK.8021x b/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-NoISK.8021x @@ -1,12 +1,12 @@ [Security] EAP-Method=PEAP -EAP-Identity=open@identity.com +EAP-Identity=peapv0@example.com EAP-PEAP-CACert=/tmp/certs/cert-ca.pem EAP-PEAP-ClientCert=/tmp/certs/cert-client.pem EAP-PEAP-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem EAP-PEAP-Phase2-Method=MD5 -EAP-PEAP-Phase2-Identity=secure@identity.com -EAP-PEAP-Phase2-Password=testpasswd +EAP-PEAP-Phase2-Identity=md5-phase2@example.com +EAP-PEAP-Phase2-Password=Password [Settings] AutoConnect=false diff --git a/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-NoISK.conf b/autotests/testEAP-PEAPv0-CryptoBinding/ssidEAP-PEAPv0-NoISK.conf @@ -6,7 +6,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/secrets/eap-user-peap-v0.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-PWD/IWD-Frag/main.conf b/autotests/testEAP-PWD/IWD-Frag/main.conf @@ -1,2 +0,0 @@ -[EAP] -MTU=40 diff --git a/autotests/testEAP-PWD/connection_test.py b/autotests/testEAP-PWD/connection_test.py @@ -1,70 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - hostapd = HostapdCLI(config='ssidEAP-PWD.conf') - - self.assertIsNotNone(hostapd) - - psk_agent = PSKAgent('eap-pwd-identity', ('eap-pwd-identity', - 'secret123')) - wd.register_psk_agent(psk_agent) - - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PWD') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - hostapd.eapol_reauth(device.address) - - hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED') - hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS') - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PWD.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PWD/frag_test.py b/autotests/testEAP-PWD/frag_test.py @@ -1,49 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - devices = wd.list_devices(1) - self.assertIsNotNone(devices) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-PWD-frag') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-PWD-frag.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-PWD/hw.conf b/autotests/testEAP-PWD/hw.conf @@ -1,7 +0,0 @@ -[SETUP] -num_radios=3 -start_iwd=0 - -[HOSTAPD] -rad0=ssidEAP-PWD.conf -rad1=ssidEAP-PWD-frag.conf diff --git a/autotests/testEAP-PWD/pwd.eap_user b/autotests/testEAP-PWD/pwd.eap_user @@ -1 +0,0 @@ -"eap-pwd-identity" PWD "secret123" diff --git a/autotests/testEAP-PWD/ssidEAP-PWD-frag.8021x b/autotests/testEAP-PWD/ssidEAP-PWD-frag.8021x @@ -1,7 +0,0 @@ -[Security] -EAP-Method=PWD -EAP-Identity=eap-pwd-identity -EAP-Password=secret123 - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PWD/ssidEAP-PWD-frag.conf b/autotests/testEAP-PWD/ssidEAP-PWD-frag.conf @@ -1,16 +0,0 @@ -hw_mode=g -channel=1 - -driver=nl80211 -ieee8021x=1 -eap_server=1 -ssid=ssidEAP-PWD-frag -eap_user_file=/tmp/pwd.eap_user -wpa=2 -wpa_key_mgmt=WPA-EAP -wpa_pairwise=TKIP CCMP -rsn_pairwise=CCMP TKIP -wpa_passphrase=secret123 -channel=1 -pwd_group=19 -fragment_size=80 diff --git a/autotests/testEAP-PWD/ssidEAP-PWD.8021x b/autotests/testEAP-PWD/ssidEAP-PWD.8021x @@ -1,6 +0,0 @@ -[Security] -EAP-Method=PWD -EAP-Identity=eap-pwd-identity - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-PWD/ssidEAP-PWD.conf b/autotests/testEAP-PWD/ssidEAP-PWD.conf @@ -1,15 +0,0 @@ -hw_mode=g -channel=1 - -driver=nl80211 -ieee8021x=1 -eap_server=1 -ssid=ssidEAP-PWD -eap_user_file=/tmp/pwd.eap_user -wpa=2 -wpa_key_mgmt=WPA-EAP -wpa_pairwise=TKIP CCMP -rsn_pairwise=CCMP TKIP -wpa_passphrase=secret123 - -pwd_group=20 diff --git a/autotests/testEAP-SIM-ofono/connection_test.py b/autotests/testEAP-SIM-ofono/connection_test.py @@ -1,60 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -from hlrauc import AuthCenter -from ofono import Ofono -from config import ctx - -class Test(unittest.TestCase): - - def test_connection_success(self): - ofono = Ofono() - ofono.enable_modem('/phonesim') - ofono.wait_for_sim_auth() - - wd = IWD() - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-SIM') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - @classmethod - def setUpClass(cls): - if not ctx.is_process_running('ofonod'): - cls.skipTest(cls, "ofono not running") - - IWD.copy_to_storage('ssidEAP-SIM.8021x') - - cls.auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - - cls.auth.stop() - cls.auth = None - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-SIM-ofono/hw.conf b/autotests/testEAP-SIM-ofono/hw.conf @@ -1,6 +0,0 @@ -[SETUP] -num_radios=2 -sim_keys=ofono - -[HOSTAPD] -rad0=ssidEAP-SIM.conf diff --git a/autotests/testEAP-SIM-ofono/sim.db b/autotests/testEAP-SIM-ofono/sim.db @@ -1 +0,0 @@ -12345678:673fb8cd35f98800:1fb1e3b5:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD -\ No newline at end of file diff --git a/autotests/testEAP-SIM-ofono/sim.eap_user b/autotests/testEAP-SIM-ofono/sim.eap_user @@ -1 +0,0 @@ -"112345678@phonesim.org" SIM -\ No newline at end of file diff --git a/autotests/testEAP-SIM-ofono/ssidEAP-SIM.8021x b/autotests/testEAP-SIM-ofono/ssidEAP-SIM.8021x @@ -1,5 +0,0 @@ -[Security] -EAP-Method=SIM - -[Settings] -AutoConnect=false diff --git a/autotests/testEAP-SIM-ofono/ssidEAP-SIM.conf b/autotests/testEAP-SIM-ofono/ssidEAP-SIM.conf @@ -1,16 +0,0 @@ -hw_mode=g -channel=1 - -driver=nl80211 -ieee8021x=1 -eap_server=1 -ssid=ssidEAP-SIM -eap_user_file=/tmp/sim.eap_user -eap_sim_db=unix:/tmp/hlrauc.sock -wpa=2 -wpa_key_mgmt=WPA-EAP -wpa_pairwise=TKIP CCMP -rsn_pairwise=CCMP TKIP -wpa_passphrase=secret123 -channel=1 -eap_sim_aka_result_ind=1 diff --git a/autotests/testEAP-TLS-Frag/ssidEAP-TLS.8021x b/autotests/testEAP-TLS-Frag/ssidEAP-TLS.8021x @@ -3,7 +3,7 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com [Settings] AutoConnect=False diff --git a/autotests/testEAP-TLS-Frag/ssidEAP-TLS.conf b/autotests/testEAP-TLS-Frag/ssidEAP-TLS.conf @@ -8,7 +8,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLS-embedded-pems/connection_test.py b/autotests/testEAP-TLS-embedded-pems/connection_test.py @@ -1,62 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType -import testutil -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def do_test_connection_success(self, ssid, passphrase=None): - hostapd = HostapdCLI(config=ssid + '.conf') - wd = IWD() - - if passphrase: - psk_agent = PSKAgent(passphrase) - wd.register_psk_agent(psk_agent) - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network(ssid) - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected(hostapd.ifname, device.name) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - if passphrase: - wd.unregister_psk_agent(psk_agent) - - def test_eap_tls(self): - self.do_test_connection_success('ssidEAP-TLS') - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TLS.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TLS-embedded-pems/hw.conf b/autotests/testEAP-TLS-embedded-pems/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TLS.conf diff --git a/autotests/testEAP-TLS-embedded-pems/ssidEAP-TLS.8021x b/autotests/testEAP-TLS-embedded-pems/ssidEAP-TLS.8021x @@ -1,94 +0,0 @@ -[Security] -EAP-Method=TLS -EAP-TLS-CACert=embed:cert_ca -EAP-TLS-ClientCert=embed:cert_client -EAP-TLS-ClientKey=embed:cert_client_key -EAP-Identity=abc@example.com - -[@pem@cert_ca] ------BEGIN CERTIFICATE----- -MIIEVDCCAzygAwIBAgIJAJmt2W7CutHvMA0GCSqGSIb3DQEBCwUAMHgxNTAzBgNV -BAoMLEludGVybmF0aW9uYWwgVW5pb24gb2YgRXhhbXBsZSBPcmdhbml6YXRpb25z -MR8wHQYDVQQDDBZDZXJ0aWZpY2F0ZSBpc3N1ZXIgZ3V5MR4wHAYJKoZIhvcNAQkB -Fg9jYUBtYWlsLmV4YW1wbGUwHhcNMTYwNTE3MjEyMDQ2WhcNNDMxMDAzMjEyMDQ2 -WjB4MTUwMwYDVQQKDCxJbnRlcm5hdGlvbmFsIFVuaW9uIG9mIEV4YW1wbGUgT3Jn -YW5pemF0aW9uczEfMB0GA1UEAwwWQ2VydGlmaWNhdGUgaXNzdWVyIGd1eTEeMBwG -CSqGSIb3DQEJARYPY2FAbWFpbC5leGFtcGxlMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAo3GrGqW49h8kY2Wx/1kd5dIkYGazuWrX93ma9904hHBJNsvu -V34QfHVln6wDpMZMwuvkfct09kl0rQpztJzA9YL4GMdmV6+6J6LiX1kMqLkNaJa+ -Ov+ECG5ypBRbSTYKpqFsc5wPOQf/N8brBiZS1v67va3fCwO6dgLeAf7dZ3Q70oUr -mghbK8UnlC+wLShxCBAW8TUKg7B7M5Gea794CO9wH7NsFyAr963WVcLxrdL3xMHZ -9hcscrljh35nCAc6sum1cTtWI651OGehr0Bhp2o2Exgr2mbo5TobqEW+fe4gc4ik -0nzHGWiOVaszUcvpeeduGV3y6om93atffeKuxQIDAQABo4HgMIHdMA8GA1UdEwQI -MAYBAf8CAQAwHQYDVR0OBBYEFO+M3tJAELTnseUqZyP4vl5X7SmUMIGqBgNVHSME -gaIwgZ+AFO+M3tJAELTnseUqZyP4vl5X7SmUoXykejB4MTUwMwYDVQQKDCxJbnRl -cm5hdGlvbmFsIFVuaW9uIG9mIEV4YW1wbGUgT3JnYW5pemF0aW9uczEfMB0GA1UE -AwwWQ2VydGlmaWNhdGUgaXNzdWVyIGd1eTEeMBwGCSqGSIb3DQEJARYPY2FAbWFp -bC5leGFtcGxlggkAma3ZbsK60e8wDQYJKoZIhvcNAQELBQADggEBAA/Yb9jB94OF -swbyCrA6Qe53YGC4dfqrKGRThtGKTrH0XcM2x2qLIIbiNDogwhRqlUW8iNY6Dm2k -43mJzNsYhy7Nt3IJFCguTJFilfGzQnBtK8wCr/C9qsj//BESOIlo/TDZ2Ho4ixcJ -n+FTnN34F6JJ0DIvA6tNBe1kUFSrbubL8ygNWJ9BKMebEzokGNGCGFNr70DlQj2o -1EOMMOkj0gWO0WegAYFLojzag3l+uvU59YE+/fbZ2iclyvbF7IutQ5M9g5TnQE6F -f+qFKR5+bhlJwry6vLl/6ulihkvF3y1bm7zae62zbFaZRU6PJUl1DtXiA23ZTm9T -VDivqs07R84= ------END CERTIFICATE----- - -[@pem@cert_client] ------BEGIN CERTIFICATE----- -MIIEPTCCAyWgAwIBAgIJAPk7rut4SWQCMA0GCSqGSIb3DQEBCwUAMHgxNTAzBgNV -BAoMLEludGVybmF0aW9uYWwgVW5pb24gb2YgRXhhbXBsZSBPcmdhbml6YXRpb25z -MR8wHQYDVQQDDBZDZXJ0aWZpY2F0ZSBpc3N1ZXIgZ3V5MR4wHAYJKoZIhvcNAQkB -Fg9jYUBtYWlsLmV4YW1wbGUwHhcNMTYwNTE3MjEyMDQ3WhcNNDMxMDAzMjEyMDQ3 -WjBnMSEwHwYDVQQKDBhCYXIgRXhhbXBsZSBPcmdhbml6YXRpb24xITAfBgNVBAMM -GEJhciBFeGFtcGxlIE9yZ2FuaXphdGlvbjEfMB0GCSqGSIb3DQEJARYQYmFyQG1h -aWwuZXhhbXBsZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOE5D/lU -haTC3xL281ttZPRURXlKJqLwcHGXQSuQm6wwYWtAhLyMLEHrryE0oChKdw3eV7Nn -/IODxvk1S8uIuKfHWuNd5qX/yu7CjCWvyim2CSJHF24rQFmb9ePoddOZnDMMAIz7 -PC325JVhbr/LSBLbqhZ0smHy1HKyrzzHHzKU4YcTH/3+3H4MHZwnNZfbfG5qhRZG -Nuu/8t+AWVcEocPRGYZpzWJNq6AAzojAHSSOxxiscBMiuQ+BdofPw9XhwpS+Fstk -rvF8J9FfZj5U3FOm/EgOQn8efnrUL231PqB1R9PIKYv/938p3iDMIi0ETiKi5ced -WV8m2PcykPdNOKMCAwEAAaOB2jCB1zAJBgNVHRMEAjAAMB0GA1UdDgQWBBTs9eey -OkMw3uiPpDOa3b9KErbEfzCBqgYDVR0jBIGiMIGfgBTvjN7SQBC057HlKmcj+L5e -V+0plKF8pHoweDE1MDMGA1UECgwsSW50ZXJuYXRpb25hbCBVbmlvbiBvZiBFeGFt -cGxlIE9yZ2FuaXphdGlvbnMxHzAdBgNVBAMMFkNlcnRpZmljYXRlIGlzc3VlciBn -dXkxHjAcBgkqhkiG9w0BCQEWD2NhQG1haWwuZXhhbXBsZYIJAJmt2W7CutHvMA0G -CSqGSIb3DQEBCwUAA4IBAQA8MxPjU2h5gwntQeSs8eeaEUILMkoU6JSDS4s5Hex5 -xYMLfcSoPPI0E6ahvKtWkSM0UZThyWsulSDTI1EgAiebjms06m1Ogh9V+0VbcOlQ -D/k3+fSRIiyY+v3J/h8ArUby+m5O2g1TgECr/nZl4avoAI0RpBi3lH6tC8GQYdbc -SA6hpNCM/dY3LWtAo2W6mdE8+RlCuTj4VZiQ1g6GE77t6XwDFL6vQBzLLXrinvXK -Ha+IssV5sGdpH9bVFWIJV2q3OZuv3HLhQfGmeUrGyWVcokQQ8d6kRwg65Zb1+KT2 -bNlVKhPAMBk4ayEocpqFIfqfCKDjGdPUruIh8IVDc684 ------END CERTIFICATE----- - -[@pem@cert_client_key] ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDhOQ/5VIWkwt8S -9vNbbWT0VEV5Siai8HBxl0ErkJusMGFrQIS8jCxB668hNKAoSncN3lezZ/yDg8b5 -NUvLiLinx1rjXeal/8ruwowlr8optgkiRxduK0BZm/Xj6HXTmZwzDACM+zwt9uSV -YW6/y0gS26oWdLJh8tRysq88xx8ylOGHEx/9/tx+DB2cJzWX23xuaoUWRjbrv/Lf -gFlXBKHD0RmGac1iTaugAM6IwB0kjscYrHATIrkPgXaHz8PV4cKUvhbLZK7xfCfR -X2Y+VNxTpvxIDkJ/Hn561C9t9T6gdUfTyCmL//d/Kd4gzCItBE4iouXHnVlfJtj3 -MpD3TTijAgMBAAECggEBAIbg9YAL7j1NtupUmkkWqm7oSPLqRVkvRSfBvXWplJD6 -KF1itht0lsyjqK3qJj/62HGlxj/a9o6MTIzSLiImLu/Lo9KmWYrwNUfnmqa3MArq -yW2NxapknJUNoaRrgqTGSZUIiwvjKZcdVKdhQkH6K5+fja0FFg8yrahC+k8bsMNI -5mw8NwRdR3SvHJWHCLfKCQ31tju7On/4C6jr0siUCc2//W+SO5c+FHDY1bma02cp -jXTEiFpw91YcyKxiADIaH9/qfxWdefxqYg1WlUeXF3jYt5xYnYr34qKW1gOZ3jy1 -QJ3esn382ZTml3TFZWy+g9tkYyOSgmDwQZbLk/ppBAECgYEA8RzLBFwP018ieMBv -khDtwcKk6ZihkWZxEPQPuUljWzzAHn/f3dXOcrfmflAKeoDEeYDimDYDizTLDPC4 -zmWkMJHNadcM5H065BbGVFQWXo47ltccfIlB/1vzG8aywfJ/yNfHvH87wbH2eg6N -yOr+96ZjLJszQ+Rv189BbXDzTcMCgYEA7yEbUL/A1J0l2kLoYyS0vfVa7AyBVOFW -vPgfkF7HdNpIiFWlukMr+DWOolaoZp5iHqQXFwJsL8qCcrbZuHbaNHAI/5vDE9xG -fh8KzrfBrjIPIyNm6EWpsBo5unXK+wTeqIAGKdzDo5Q3zEE6G5DkkHItKA7yjPOM -gz/b/MR3W6ECgYBBv3dA3hXWrreIs/j4nLMoxfoQVPWh34xvcg4jmXaFd6Bv8LDM -HjRopestgIgK9bgd5d5kYT5AJIpGIhJS/fZy5B9egCzc1aVMc0Vr024yJJjtPgVf -lFIx3xIA/gLazlS4INcveIaEABJVIEjbg/E4+N9MV5n4Jn+1GqgdvtIp3wKBgQC0 -C3lFkxrc+nVFoJrYCwsK+3E5yTCXeBKWtTsOuE307WUvQU1GsMyqVajPEfA5U4cN -Cv9Xk7thQFh3hrTm7pXcZX5g9iYrDe8FhtncSv7I6Wf8TOtudwUMUrKkcYwi88ex -lrMNUer7ft2ELJhTqQRuvYjCYH6/IaDqMWqxJju4AQKBgQDPjOh75ykQc93SsYpt -Tb4gQKLeqOb57pofT8D44DccatfEgk31D4fBIIQu6XKopQmCtQyX9DUDjOWFTxuo -IMPysN6Fh1quCbC6Xt5xfKoaJG5yQYKeKtLhknwEW9SUifU2xVrOcPikLs7Iwmmp -BkDLsu/YKwRFSfrbYZXbTlU8tQ== ------END PRIVATE KEY----- - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TLS-embedded-pems/ssidEAP-TLS.conf b/autotests/testEAP-TLS-embedded-pems/ssidEAP-TLS.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TLS - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLS/connection_test.py b/autotests/testEAP-TLS/connection_test.py @@ -1,74 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType -import testutil -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def do_test_connection_success(self, ssid, passphrase=None): - hapd = HostapdCLI(config=ssid + '.conf') - wd = IWD() - - if passphrase: - psk_agent = PSKAgent(passphrase) - wd.register_psk_agent(psk_agent) - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network(ssid) - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected(hapd.ifname, device.name) - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - if passphrase: - wd.unregister_psk_agent(psk_agent) - - def test_eap_tls(self): - self.do_test_connection_success('ssidEAP-TLS') - - def test_eap_tls2(self): - self.do_test_connection_success('ssidEAP-TLS2') - - def test_eap_tls3(self): - self.do_test_connection_success('ssidEAP-TLS3', 'abc') - - def test_eap_tls4(self): - self.do_test_connection_success('ssidEAP-TLS4') - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TLS.8021x') - IWD.copy_to_storage('ssidEAP-TLS2.8021x') - IWD.copy_to_storage('ssidEAP-TLS3.8021x') - IWD.copy_to_storage('ssidEAP-TLS4.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TLS/hw.conf b/autotests/testEAP-TLS/hw.conf @@ -1,8 +0,0 @@ -[SETUP] -num_radios=5 - -[HOSTAPD] -rad0=ssidEAP-TLS.conf -rad1=ssidEAP-TLS2.conf -rad2=ssidEAP-TLS3.conf -rad3=ssidEAP-TLS4.conf diff --git a/autotests/testEAP-TLS/ssidEAP-TLS.8021x b/autotests/testEAP-TLS/ssidEAP-TLS.8021x @@ -1,9 +0,0 @@ -[Security] -EAP-Method=TLS -EAP-TLS-CACert=/tmp/certs/cert-ca.pem -EAP-TLS-ClientCert=/tmp/certs/cert-client.pem -EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TLS/ssidEAP-TLS.conf b/autotests/testEAP-TLS/ssidEAP-TLS.conf @@ -1,13 +0,0 @@ -ctrl_interface=/var/run/hostapd -hw_mode=g -channel=1 -ssid=ssidEAP-TLS - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLS/ssidEAP-TLS2.8021x b/autotests/testEAP-TLS/ssidEAP-TLS2.8021x @@ -1,10 +0,0 @@ -[Security] -EAP-Method=TLS -EAP-TLS-CACert=/tmp/certs/cert-ca.pem -EAP-TLS-ClientCert=/tmp/certs/cert-client.pem -EAP-TLS-ClientKey=/tmp/certs/cert-client-key-md5-des.pem -EAP-TLS-ClientKeyPassphrase=abc -EAP-Identity=abc@example.com - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TLS/ssidEAP-TLS2.conf b/autotests/testEAP-TLS/ssidEAP-TLS2.conf @@ -1,13 +0,0 @@ -ctrl_interface=/var/run/hostapd -hw_mode=g -channel=2 -ssid=ssidEAP-TLS2 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLS/ssidEAP-TLS3.8021x b/autotests/testEAP-TLS/ssidEAP-TLS3.8021x @@ -1,9 +0,0 @@ -[Security] -EAP-Method=TLS -EAP-TLS-CACert=/tmp/certs/cert-ca.pem -EAP-TLS-ClientCert=/tmp/certs/cert-client.crt -EAP-TLS-ClientKey=/tmp/certs/cert-client-key-v2-des-ede3.pem -EAP-Identity=abc@example.com - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TLS/ssidEAP-TLS3.conf b/autotests/testEAP-TLS/ssidEAP-TLS3.conf @@ -1,13 +0,0 @@ -ctrl_interface=/var/run/hostapd -hw_mode=g -channel=3 -ssid=ssidEAP-TLS3 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLS/ssidEAP-TLS4.8021x b/autotests/testEAP-TLS/ssidEAP-TLS4.8021x @@ -1,9 +0,0 @@ -[Security] -EAP-Method=TLS -EAP-TLS-CACert=/tmp/certs/cert-ca.pem -EAP-TLS-ClientKeyBundle=/tmp/certs/cert-client.p12 -EAP-TLS-ClientKeyPassphrase=abc -EAP-Identity=abc@example.com - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TLS/ssidEAP-TLS4.conf b/autotests/testEAP-TLS/ssidEAP-TLS4.conf @@ -1,13 +0,0 @@ -ctrl_interface=/var/run/hostapd -hw_mode=g -channel=4 -ssid=ssidEAP-TLS4 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLSwithMFPC/ssidEAP-TLS.8021x b/autotests/testEAP-TLSwithMFPC/ssidEAP-TLS.8021x @@ -3,7 +3,7 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com [Settings] AutoConnect=False diff --git a/autotests/testEAP-TLSwithMFPC/ssidEAP-TLS.conf b/autotests/testEAP-TLSwithMFPC/ssidEAP-TLS.conf @@ -5,7 +5,7 @@ ssid=ssidEAP-TLS wpa=2 ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TLSwithMFPR/ssidEAP-TLS.8021x b/autotests/testEAP-TLSwithMFPR/ssidEAP-TLS.8021x @@ -3,7 +3,7 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com [Settings] AutoConnect=False diff --git a/autotests/testEAP-TLSwithMFPR/ssidEAP-TLS.conf b/autotests/testEAP-TLSwithMFPR/ssidEAP-TLS.conf @@ -5,7 +5,7 @@ ssid=ssidEAP-TLS wpa=2 ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-CHAP/connection_test.py b/autotests/testEAP-TTLS-CHAP/connection_test.py @@ -1,68 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -import testutil -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def test_connection_success(self): - hostapd = HostapdCLI(config='ssidEAP-TTLS-CHAP.conf') - - self.assertIsNotNone(hostapd) - - wd = IWD() - - psk_agent = PSKAgent('abc', ('user', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - device = wd.list_devices(1)[0] - - ordered_network = device.get_ordered_network('ssidEAP-TTLS-CHAP') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - hostapd.eapol_reauth(device.address) - - hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED') - hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS') - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS-CHAP.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-CHAP/eap-user-ttls-chap.text b/autotests/testEAP-TTLS-CHAP/eap-user-ttls-chap.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"user" TTLS-CHAP "testpasswd" [2] diff --git a/autotests/testEAP-TTLS-CHAP/hw.conf b/autotests/testEAP-TTLS-CHAP/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TTLS-CHAP.conf diff --git a/autotests/testEAP-TTLS-CHAP/ssidEAP-TTLS-CHAP.8021x b/autotests/testEAP-TTLS-CHAP/ssidEAP-TTLS-CHAP.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=anonymous -EAP-TTLS-Phase2-Method=Tunneled-CHAP - -# If CHAP Identity and Password are left out, they will be requested through -# the agent. -#EAP-TTLS-Phase2-Identity=user -#EAP-TTLS-Phase2-Password=testpasswd - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TTLS-CHAP/ssidEAP-TTLS-CHAP.conf b/autotests/testEAP-TTLS-CHAP/ssidEAP-TTLS-CHAP.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS-CHAP - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-ttls-chap.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py b/autotests/testEAP-TTLS-EAP-MSCHAPV2/connection_test.py @@ -1,55 +0,0 @@ -#! /usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType -import testutil - -class Test(unittest.TestCase): - - def test_connection_success(self): - wd = IWD() - - psk_agent = PSKAgent('abc', ('user', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-TTLS') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/hw.conf b/autotests/testEAP-TTLS-EAP-MSCHAPV2/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TTLS.conf diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/ssidEAP-TTLS.8021x b/autotests/testEAP-TTLS-EAP-MSCHAPV2/ssidEAP-TTLS.8021x @@ -1,8 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=abc@example.com -EAP-TTLS-CACert=/tmp/certs/cert-ca.pem -EAP-TTLS-ClientCert=/tmp/certs/cert-client.pem -EAP-TTLS-ClientKey=/tmp/certs/cert-client-key-v2-des-ede3.pem -EAP-TTLS-Phase2-Method=MSCHAPV2 -EAP-TTLS-Phase2-Identity=user diff --git a/autotests/testEAP-TTLS-EAP-MSCHAPV2/ssidEAP-TTLS.conf b/autotests/testEAP-TTLS-EAP-MSCHAPV2/ssidEAP-TTLS.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-ttls-mschapv2.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-Frag/ssidEAP-TTLS.8021x b/autotests/testEAP-TTLS-Frag/ssidEAP-TTLS.8021x @@ -1,12 +1,12 @@ [Security] EAP-Method=TTLS -EAP-Identity=abc@example.com +EAP-Identity=ttls@example.com EAP-TTLS-CACert=/tmp/certs/cert-ca.pem EAP-TTLS-ClientCert=/tmp/certs/cert-client.pem EAP-TTLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem EAP-TTLS-Phase2-Method=MD5 -EAP-TTLS-Phase2-Identity=abc@example.com -EAP-TTLS-Phase2-Password=testpasswd +EAP-TTLS-Phase2-Identity=md5-phase2@example.com +EAP-TTLS-Phase2-Password=Password [Settings] AutoConnect=False diff --git a/autotests/testEAP-TTLS-Frag/ssidEAP-TTLS.conf b/autotests/testEAP-TTLS-Frag/ssidEAP-TTLS.conf @@ -8,7 +8,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-ttls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-MSCHAP/connection_test.py b/autotests/testEAP-TTLS-MSCHAP/connection_test.py @@ -1,68 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -import testutil -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def test_connection_success(self): - hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAP.conf') - - self.assertIsNotNone(hostapd) - - wd = IWD() - - psk_agent = PSKAgent('abc', ('user', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - device = wd.list_devices(1)[0] - - ordered_network = device.get_ordered_network('ssidEAP-TTLS-MSCHAP') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - hostapd.eapol_reauth(device.address) - - hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED') - hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS') - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS-MSCHAP.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-MSCHAP/eap-user-ttls-mschap.text b/autotests/testEAP-TTLS-MSCHAP/eap-user-ttls-mschap.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"user" TTLS-MSCHAP "testpasswd" [2] diff --git a/autotests/testEAP-TTLS-MSCHAP/hw.conf b/autotests/testEAP-TTLS-MSCHAP/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TTLS-MSCHAP.conf diff --git a/autotests/testEAP-TTLS-MSCHAP/ssidEAP-TTLS-MSCHAP.8021x b/autotests/testEAP-TTLS-MSCHAP/ssidEAP-TTLS-MSCHAP.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=anonymous -EAP-TTLS-Phase2-Method=Tunneled-MSCHAP - -# If MSCHAP Identity and Password are left out, they will be requested through -# the agent. -#EAP-TTLS-Phase2-Identity=user -#EAP-TTLS-Phase2-Password=testpasswd - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TTLS-MSCHAP/ssidEAP-TTLS-MSCHAP.conf b/autotests/testEAP-TTLS-MSCHAP/ssidEAP-TTLS-MSCHAP.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS-MSCHAP - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-ttls-mschap.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py b/autotests/testEAP-TTLS-MSCHAPv2/connection_test.py @@ -1,72 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -import testutil -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf') - - self.assertIsNotNone(hostapd) - - psk_agent = PSKAgent('abc', ('domain\\user', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - device = wd.list_devices(1)[0]; - - ordered_network = device.get_ordered_network('ssidEAP-TTLS-MSCHAPv2') - - self.assertEqual(ordered_network.name, "ssidEAP-TTLS-MSCHAPv2") - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - hostapd.eapol_reauth(device.address) - - hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED') - hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS') - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - def test_connection_success(self): - wd = IWD(True) - - self.validate_connection(wd) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS-MSCHAPv2.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-MSCHAPv2/eap-user-ttls-mschapv2.text b/autotests/testEAP-TTLS-MSCHAPv2/eap-user-ttls-mschapv2.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"domain\user" TTLS-MSCHAPV2 "testpasswd" [2] diff --git a/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py b/autotests/testEAP-TTLS-MSCHAPv2/failure_test.py @@ -1,57 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -import testutil -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def validate_connection(self, wd): - hostapd = HostapdCLI(config='ssidEAP-TTLS-MSCHAPv2.conf') - - self.assertIsNotNone(hostapd) - - psk_agent = PSKAgent('abc', ('user', 'incorrect_password')) - wd.register_psk_agent(psk_agent) - - device = wd.list_devices(1)[0]; - - ordered_network = device.get_ordered_network("ssidEAP-TTLS-MSCHAPv2") - - self.assertEqual(ordered_network.name, "ssidEAP-TTLS-MSCHAPv2") - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - with self.assertRaises(iwd.FailedEx): - ordered_network.network_object.connect() - - wd.unregister_psk_agent(psk_agent) - - def test_connection_success(self): - wd = IWD(True) - - try: - self.validate_connection(wd) - finally: - del wd - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS-MSCHAPv2.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-MSCHAPv2/hw.conf b/autotests/testEAP-TTLS-MSCHAPv2/hw.conf @@ -1,6 +0,0 @@ -[SETUP] -num_radios=2 -start_iwd=False - -[HOSTAPD] -rad0=ssidEAP-TTLS-MSCHAPv2.conf diff --git a/autotests/testEAP-TTLS-MSCHAPv2/ssidEAP-TTLS-MSCHAPv2.8021x b/autotests/testEAP-TTLS-MSCHAPv2/ssidEAP-TTLS-MSCHAPv2.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=anonymous -EAP-TTLS-Phase2-Method=Tunneled-MSCHAPv2 - -# If MSCHAP Identity and Password are left out, they will be requested through -# the agent. -#EAP-TTLS-Phase2-Identity=user -#EAP-TTLS-Phase2-Password=testpasswd - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TTLS-MSCHAPv2/ssidEAP-TTLS-MSCHAPv2.conf b/autotests/testEAP-TTLS-MSCHAPv2/ssidEAP-TTLS-MSCHAPv2.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS-MSCHAPv2 - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-ttls-mschapv2.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS-PAP/connection_test.py b/autotests/testEAP-TTLS-PAP/connection_test.py @@ -1,68 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -import testutil -from iwd import IWD -from iwd import PSKAgent -from iwd import NetworkType - -from hostapd import HostapdCLI - -class Test(unittest.TestCase): - - def test_connection_success(self): - hostapd = HostapdCLI(config='ssidEAP-TTLS-PAP.conf') - - self.assertIsNotNone(hostapd) - - wd = IWD() - - psk_agent = PSKAgent('abc', ('user', 'testpasswd')) - wd.register_psk_agent(psk_agent) - - device = wd.list_devices(1)[0] - - ordered_network = device.get_ordered_network('ssidEAP-TTLS-PAP') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - hostapd.eapol_reauth(device.address) - - hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED') - hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS') - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - wd.unregister_psk_agent(psk_agent) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS-PAP.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS-PAP/eap-user-ttls-pap.text b/autotests/testEAP-TTLS-PAP/eap-user-ttls-pap.text @@ -1,4 +0,0 @@ -# Phase 1 users -* TTLS -# Phase 2 -"user" TTLS-PAP "testpasswd" [2] diff --git a/autotests/testEAP-TTLS-PAP/hw.conf b/autotests/testEAP-TTLS-PAP/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TTLS-PAP.conf diff --git a/autotests/testEAP-TTLS-PAP/ssidEAP-TTLS-PAP.8021x b/autotests/testEAP-TTLS-PAP/ssidEAP-TTLS-PAP.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=anonymous -EAP-TTLS-Phase2-Method=Tunneled-PAP - -# If PAP Identity and Password are left out, they will be requested through -# the agent. -#EAP-TTLS-Phase2-Identity=user -#EAP-TTLS-Phase2-Password=testpasswd - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TTLS-PAP/ssidEAP-TTLS-PAP.conf b/autotests/testEAP-TTLS-PAP/ssidEAP-TTLS-PAP.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS-PAP - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/eap-user-ttls-pap.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testEAP-TTLS/connection_test.py b/autotests/testEAP-TTLS/connection_test.py @@ -1,49 +0,0 @@ -#!/usr/bin/python3 - -import unittest -import sys - -sys.path.append('../util') -import iwd -from iwd import IWD -from iwd import NetworkType -import testutil - -class Test(unittest.TestCase): - - def test_connection_success(self): - wd = IWD() - - devices = wd.list_devices(1) - device = devices[0] - - ordered_network = device.get_ordered_network('ssidEAP-TTLS') - - self.assertEqual(ordered_network.type, NetworkType.eap) - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - ordered_network.network_object.connect() - - condition = 'obj.state == DeviceState.connected' - wd.wait_for_object_condition(device, condition) - - testutil.test_iface_operstate() - testutil.test_ifaces_connected() - - device.disconnect() - - condition = 'not obj.connected' - wd.wait_for_object_condition(ordered_network.network_object, condition) - - @classmethod - def setUpClass(cls): - IWD.copy_to_storage('ssidEAP-TTLS.8021x') - - @classmethod - def tearDownClass(cls): - IWD.clear_storage() - -if __name__ == '__main__': - unittest.main(exit=True) diff --git a/autotests/testEAP-TTLS/hw.conf b/autotests/testEAP-TTLS/hw.conf @@ -1,5 +0,0 @@ -[SETUP] -num_radios=2 - -[HOSTAPD] -rad0=ssidEAP-TTLS.conf diff --git a/autotests/testEAP-TTLS/ssidEAP-TTLS.8021x b/autotests/testEAP-TTLS/ssidEAP-TTLS.8021x @@ -1,12 +0,0 @@ -[Security] -EAP-Method=TTLS -EAP-Identity=abc@example.com -EAP-TTLS-CACert=/tmp/certs/cert-ca.pem -EAP-TTLS-ClientCert=/tmp/certs/cert-client.pem -EAP-TTLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-TTLS-Phase2-Method=MD5 -EAP-TTLS-Phase2-Identity=abc@example.com -EAP-TTLS-Phase2-Password=testpasswd - -[Settings] -AutoConnect=False diff --git a/autotests/testEAP-TTLS/ssidEAP-TTLS.conf b/autotests/testEAP-TTLS/ssidEAP-TTLS.conf @@ -1,12 +0,0 @@ -hw_mode=g -channel=1 -ssid=ssidEAP-TTLS - -wpa=3 -wpa_key_mgmt=WPA-EAP -ieee8021x=1 -eap_server=1 -eap_user_file=/tmp/certs/eap-user-ttls.text -ca_cert=/tmp/certs/cert-ca.pem -server_cert=/tmp/certs/cert-server.pem -private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testFILS/fils_256_test.py b/autotests/testFILS/fils_256_test.py @@ -7,7 +7,6 @@ import os sys.path.append('../util') import iwd from iwd import IWD -from iwd import PSKAgent from iwd import NetworkType from hostapd import HostapdCLI import testutil @@ -18,10 +17,6 @@ class Test(unittest.TestCase): wd = IWD(True) - psk_agent = PSKAgent('user@example.com', ('user@example.com', - 'secret123')) - wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1) device = devices[0] @@ -62,8 +57,6 @@ class Test(unittest.TestCase): device.disconnect() - wd.unregister_psk_agent(psk_agent) - @classmethod def setUpClass(cls): IWD.copy_to_storage('ssidFILS-256.8021x') diff --git a/autotests/testFILS/fils_384_test.py b/autotests/testFILS/fils_384_test.py @@ -7,7 +7,6 @@ import os sys.path.append('../util') import iwd from iwd import IWD -from iwd import PSKAgent from iwd import NetworkType from hostapd import HostapdCLI import testutil @@ -18,10 +17,6 @@ class Test(unittest.TestCase): wd = IWD(True) - psk_agent = PSKAgent('user@example.com', ('user@example.com', - 'secret123')) - wd.register_psk_agent(psk_agent) - devices = wd.list_devices(1) device = devices[0] @@ -62,8 +57,6 @@ class Test(unittest.TestCase): device.disconnect() - wd.unregister_psk_agent(psk_agent) - @classmethod def setUpClass(cls): IWD.copy_to_storage('ssidFILS-384.8021x') diff --git a/autotests/testFILS/pwd.eap_user b/autotests/testFILS/pwd.eap_user @@ -1 +0,0 @@ -"user@example.com" PWD "secret123" diff --git a/autotests/testFILS/radius.conf b/autotests/testFILS/radius.conf @@ -1,7 +1,7 @@ driver=none radius_server_clients=/tmp/certs/radius-clients.text radius_server_auth_port=1812 -eap_user_file=/tmp/pwd.eap_user +eap_user_file=/tmp/secrets/eap-user.text eap_server=0 eap_server_erp=1 diff --git a/autotests/testFILS/ssidFILS-256.8021x b/autotests/testFILS/ssidFILS-256.8021x @@ -1,2 +1,4 @@ [Security] EAP-Method=PWD +EAP-Identity=pwd@example.com +EAP-Password=Password diff --git a/autotests/testFILS/ssidFILS-384.8021x b/autotests/testFILS/ssidFILS-384.8021x @@ -1,2 +1,4 @@ [Security] EAP-Method=PWD +EAP-Identity=pwd@example.com +EAP-Password=Password diff --git a/autotests/testFT-8021x-roam/TestFT.8021x b/autotests/testFT-8021x-roam/TestFT.8021x @@ -3,7 +3,7 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com [Settings] AutoConnect=False diff --git a/autotests/testFT-8021x-roam/ft-eap-ccmp-1.conf b/autotests/testFT-8021x-roam/ft-eap-ccmp-1.conf @@ -13,7 +13,7 @@ wpa_key_mgmt=FT-EAP wpa_pairwise=CCMP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testFT-8021x-roam/ft-eap-ccmp-2.conf b/autotests/testFT-8021x-roam/ft-eap-ccmp-2.conf @@ -13,7 +13,7 @@ wpa_key_mgmt=FT-EAP wpa_pairwise=CCMP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testFT-FILS/TestFT.8021x b/autotests/testFT-FILS/TestFT.8021x @@ -1,7 +1,7 @@ [Security] EAP-Method=PWD -EAP-Identity=user@example.com -EAP-Password=secret123 +EAP-Identity=pwd@example.com +EAP-Password=Password [Settings] AutoConnect=False diff --git a/autotests/testFT-FILS/pwd.eap_user b/autotests/testFT-FILS/pwd.eap_user @@ -1 +0,0 @@ -"user@example.com" PWD "secret123" diff --git a/autotests/testFT-FILS/radius.conf b/autotests/testFT-FILS/radius.conf @@ -1,7 +1,7 @@ driver=none radius_server_clients=/tmp/certs/radius-clients.text radius_server_auth_port=1812 -eap_user_file=/tmp/pwd.eap_user +eap_user_file=/tmp/secrets/eap-user.text eap_server=0 eap_server_erp=1 diff --git a/autotests/testPreauth-roam/TestPreauth.8021x b/autotests/testPreauth-roam/TestPreauth.8021x @@ -3,7 +3,7 @@ EAP-Method=TLS EAP-TLS-CACert=/tmp/certs/cert-ca.pem EAP-TLS-ClientCert=/tmp/certs/cert-client.pem EAP-TLS-ClientKey=/tmp/certs/cert-client-key-pkcs8.pem -EAP-Identity=abc@example.com +EAP-Identity=tls@example.com [Settings] AutoConnect=false diff --git a/autotests/testPreauth-roam/eaptls-preauth-1.conf b/autotests/testPreauth-roam/eaptls-preauth-1.conf @@ -13,7 +13,7 @@ ieee80211w=1 # Run the RADIUS server in the BSS 0 hostapd only, listen for BSS 1 connections eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem diff --git a/autotests/testScan/ssid_8021x.conf b/autotests/testScan/ssid_8021x.conf @@ -6,7 +6,7 @@ wpa=3 wpa_key_mgmt=WPA-EAP ieee8021x=1 eap_server=1 -eap_user_file=/tmp/certs/eap-user-tls.text +eap_user_file=/tmp/secrets/eap-user.text ca_cert=/tmp/certs/cert-ca.pem server_cert=/tmp/certs/cert-server.pem private_key=/tmp/certs/cert-server-key.pem