Skip to contentSkip to conversation

plugins: remove dependency on ELL plugins

PATCH In review James Prestwood 2 participants 7 messages Sep 16, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/6 plugins: remove dependency on ELL plugins

There has been a desire to remove the ELL plugin dependency from IWD which is the only consumer of the plugin API. This removes the dependency and prepares the tree for converting the existing ofono plugin into a regular module.

sim_hardcoded was removed completely. This was originall implemented before full ofono support purely to test the IWD side of EAP-SIM/AKA. Since the ofono plugin (module-to-be) is now fully implemented there really isn't a need for sim_hardcoded.

---
 Makefile.am              |   8 +-
 bootstrap-configure      |   1 -
 configure.ac             |   5 -
 plugins/sim_hardcoded.c  | 399 ---------------------------------------
 src/main.c               |  16 --
 {plugins => src}/ofono.c |   0
 6 files changed, 1 insertion(+), 428 deletions(-)
 delete mode 100644 plugins/sim_hardcoded.c
 rename {plugins => src}/ofono.c (100%)

-v2:
* Removed sim_hardcoded all together

Makefile.am +1 -7
index 5f16920f..d85d3470 100644
@@ -185,7 +185,6 @@ if DAEMON
 libexec_PROGRAMS += src/iwd
 
 src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
-					src/plugin.h src/plugin.c \
 					src/netdev.h src/netdev.c \
 					src/wiphy.h src/wiphy.c \
 					src/device.c \
@@ -235,14 +234,9 @@ src_iwd_SOURCES = src/main.c linux/nl80211.h src/iwd.h src/missing.h \
 src_iwd_LDADD = $(ell_ldadd) -ldl
 src_iwd_DEPENDENCIES = $(ell_dependencies)
 
-if SIM_HARDCODED
-builtin_modules += sim_hardcoded
-builtin_sources += plugins/sim_hardcoded.c
-endif
-
 if OFONO
 builtin_modules += ofono
-builtin_sources += plugins/ofono.c
+builtin_sources += src/ofono.c
 endif
 
 if DBUS_POLICY
bootstrap-configure +0 -1
index 195f2e48..7b907a28 100755
@@ -13,6 +13,5 @@ fi
 		--enable-hwsim \
 		--enable-tools \
 		--enable-ofono \
-		--enable-sim-hardcoded \
 		--disable-dbus-policy \
 		--disable-systemd-service $*
configure.ac +0 -5
index bf7e94df..78db15e9 100644
@@ -291,11 +291,6 @@ AC_ARG_ENABLE([ofono], AC_HELP_STRING([--enable-ofono],
 					[enable_ofono=${enableval}])
 AM_CONDITIONAL(OFONO, test "${enable_ofono}" = "yes")
 
-AC_ARG_ENABLE([sim_hardcoded], AC_HELP_STRING([--enable-sim-hardcoded],
-				[enable hard coded SIM keys]),
-					[enable_sim_hardcoded=${enableval}])
-AM_CONDITIONAL(SIM_HARDCODED, test "${enable_sim_hardcoded}" = "yes")
-
 AC_CONFIG_FILES(Makefile)
 
 AC_OUTPUT
plugins/sim_hardcoded.c deleted +0 -399

399 lines not on this page · raw message

src/main.c +0 -16
index 3216f508..2ee6188c 100644
@@ -40,7 +40,6 @@
 #include "src/eap.h"
 #include "src/eapol.h"
 #include "src/rfkill.h"
-#include "src/plugin.h"
 #include "src/storage.h"
 #include "src/anqp.h"
 
@@ -54,8 +53,6 @@ static const char *interfaces;
 static const char *nointerfaces;
 static const char *phys;
 static const char *nophys;
-static const char *plugins;
-static const char *noplugins;
 static const char *debugopt;
 static bool terminating;
 static bool nl80211_complete;
@@ -140,8 +137,6 @@ static void usage(void)
 		"\t-I, --nointerfaces     Interfaces to ignore\n"
 		"\t-p, --phys             Phys to manage\n"
 		"\t-P, --nophys           Phys to ignore\n"
-		"\t-l, --plugin           Plugins to include\n"
-		"\t-L, --noplugin         Plugins to exclude\n"
 		"\t-d, --debug            Enable debug output\n"
 		"\t-v, --version          Show version\n"
 		"\t-h, --help             Show help options\n");
@@ -154,8 +149,6 @@ static const struct option main_options[] = {
 	{ "nointerfaces", required_argument, NULL, 'I' },
 	{ "phys",         required_argument, NULL, 'p' },
 	{ "nophys",       required_argument, NULL, 'P' },
-	{ "plugin",       required_argument, NULL, 'l' },
-	{ "noplugin",     required_argument, NULL, 'L' },
 	{ "debug",        optional_argument, NULL, 'd' },
 	{ "help",         no_argument,       NULL, 'h' },
 	{ }
@@ -179,8 +172,6 @@ static void nl80211_appeared(const struct l_genl_family_info *info,
 		l_main_quit();
 		return;
 	}
-
-	plugin_init(plugins, noplugins);
 }
 
 static void request_name_callback(struct l_dbus *dbus, bool success,
@@ -393,12 +384,6 @@ int main(int argc, char *argv[])
 		case 'P':
 			nophys = optarg;
 			break;
-		case 'l':
-			plugins = optarg;
-			break;
-		case 'L':
-			noplugins = optarg;
-			break;
 		case 'd':
 			if (optarg)
 				debugopt = optarg;
@@ -504,7 +489,6 @@ int main(int argc, char *argv[])
 
 	exit_status = l_main_run_with_signal(signal_handler, NULL);
 
-	plugin_exit();
 	iwd_modules_exit();
 	dbus_exit();
 	l_dbus_destroy(dbus);
src/ofono.c renamed from plugins/ofono.c +0 -0
similarity index 100%
rename from plugins/ofono.c
rename to src/ofono.c
Signature · 1 line
2.26.2
#1 lore raw

Hi James,

Quoted 17 lines · James Prestwood

There has been a desire to remove the ELL plugin dependency from IWD which is the only consumer of the plugin API. This removes the dependency and prepares the tree for converting the existing ofono plugin into a regular module.

sim_hardcoded was removed completely. This was originall implemented before full ofono support purely to test the IWD side of EAP-SIM/AKA. Since the ofono plugin (module-to-be) is now fully implemented there really isn't a need for sim_hardcoded.

---
  Makefile.am              |   8 +-
  bootstrap-configure      |   1 -
  configure.ac             |   5 -
  plugins/sim_hardcoded.c  | 399 ---------------------------------------
  src/main.c               |  16 --
  {plugins => src}/ofono.c |   0
  6 files changed, 1 insertion(+), 428 deletions(-)
Quoted 6 lines

delete mode 100644 plugins/sim_hardcoded.c
rename {plugins => src}/ofono.c (100%)

-v2:
* Removed sim_hardcoded all together

All applied, thanks.

Regards,
-Denis

#2 lore raw

PATCH v2 2/6 test-runner: remove ofono/hardcoded IWD options

In reply to James Prestwood
---
 tools/test-runner | 3 ---
 1 file changed, 3 deletions(-)
tools/test-runner +0 -3
index 8a257be1..a320a3f0 100755
@@ -609,7 +609,6 @@ class TestContext:
 			return
 		elif sim_keys != 'ofono':
 			os.environ['IWD_SIM_KEYS'] = sim_keys
-			self.iwd_extra_options = '--plugin=sim_hardcoded'
 			return
 
 		if not find_binary(['ofonod']) or not find_binary(['phonesim']):
@@ -618,8 +617,6 @@ class TestContext:
 
 		Process(['ifconfig', 'lo', 'up'], wait=True)
 
-		self.iwd_extra_options = '--plugin=ofono'
-
 		os.environ['OFONO_PHONESIM_CONFIG'] = '/tmp/phonesim.conf'
 
 		phonesim_args = ['phonesim', '-p', '12345', '/usr/share/phonesim/default.xml']
Signature · 1 line
2.26.2
#3 lore raw

PATCH v2 3/6 ofono: convert to module

In reply to James Prestwood
---
 src/ofono.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
src/ofono.c +4 -3
index 186dac71..3855edb3 100644
@@ -30,11 +30,12 @@
 #include <errno.h>
 
 #include <ell/ell.h>
-#include <ell/plugin.h>
 #include <ell/dbus.h>
 
 #include "src/dbus.h"
 #include "src/simauth.h"
+#include "src/module.h"
+#include "src/iwd.h"
 
 /*
  * This plugin takes care of all the communication with ofono in order to
@@ -783,5 +784,5 @@ static void ofono_exit(void)
 	l_dbus_remove_watch(dbus, ofono_watch);
 }
 
-L_PLUGIN_DEFINE(__iwd_builtin_ofono, ofono, "oFono plugin", "1.0",
-		L_PLUGIN_PRIORITY_DEFAULT, ofono_init, ofono_exit)
+IWD_MODULE(ofono, ofono_init, ofono_exit);
+IWD_MODULE_DEPENDS(ofono, simauth);
Signature · 1 line
2.26.2
#4 lore raw

PATCH v2 4/6 plugin: remove plugin source

In reply to James Prestwood
---
 src/plugin.c | 97 ----------------------------------------------------
 src/plugin.h | 24 -------------
 2 files changed, 121 deletions(-)
 delete mode 100644 src/plugin.c
 delete mode 100644 src/plugin.h
src/plugin.c deleted +0 -97
deleted file mode 100644
index b5dc828a..00000000
@@ -1,97 +0,0 @@
-/*
- *
- *  Wireless daemon for Linux
- *
- *  Copyright (C) 2017-2019  Intel Corporation. All rights reserved.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <fnmatch.h>
-
-#include <ell/ell.h>
-#include <ell/plugin.h>
-
-#include "src/builtin.h"
-#include "src/plugin.h"
-
-static bool check_plugin(struct l_plugin_desc *desc,
-						char **include, char **exclude)
-{
-	char *pattern;
-	unsigned int i;
-
-	if (!include)
-		goto check_blacklist;
-
-	for (i = 0; (pattern = include[i]); i++) {
-		if (fnmatch(pattern, desc->name, 0) != 0)
-			continue;
-
-		goto check_blacklist;
-	}
-
-	l_debug("whitelist filtered plugin: %s", desc->name);
-	return false;
-
-check_blacklist:
-	if (!exclude)
-		return true;
-
-	for (i = 0; (pattern = exclude[i]); i++) {
-		if (fnmatch(pattern, desc->name, 0) == 0) {
-			l_debug("blacklist filtered plugin: %s", desc->name);
-			return false;
-		}
-	}
-
-	return true;
-}
-
-int plugin_init(const char *include, const char *exclude)
-{
-	char **inc = NULL;
-	char **exc = NULL;
-	int i;
-
-	if (include)
-		inc = l_strsplit_set(include, ",");
-
-	if (exclude)
-		exc = l_strsplit_set(exclude, ",");
-
-	for (i = 0; __iwd_builtin[i]; i++) {
-		if (check_plugin(__iwd_builtin[i], inc, exc))
-			l_plugin_add(__iwd_builtin[i],
-					__iwd_builtin[i]->version);
-	}
-
-	l_plugin_load(NULL, NULL, NULL);
-
-	l_strfreev(inc);
-	l_strfreev(exc);
-
-	return 1;
-}
-
-void plugin_exit(void)
-{
-	l_plugin_unload();
-}
src/plugin.h deleted +0 -24
deleted file mode 100644
index 1c1cbc07..00000000
@@ -1,24 +0,0 @@
-/*
- *
- *  Wireless daemon for Linux
- *
- *  Copyright (C) 2017-2019  Intel Corporation. All rights reserved.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License as published by the Free Software Foundation; either
- *  version 2.1 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-int plugin_init(const char *include, const char *exclude);
-void plugin_exit(void);
Signature · 1 line
2.26.2
#5 lore raw

PATCH v2 5/6 auto-t: remove sim_hardcoded tests

In reply to James Prestwood
---
 .../testEAP-AKA-prime/connection_test.py      | 61 ---------------
 autotests/testEAP-AKA-prime/hw.conf           |  8 --
 autotests/testEAP-AKA-prime/sim.db            |  1 -
 autotests/testEAP-AKA-prime/sim.eap_user      |  1 -
 autotests/testEAP-AKA-prime/sim_keys.conf     |  6 --
 autotests/testEAP-AKA-prime/ssidEAP-AKA.8021x |  5 --
 autotests/testEAP-AKA-prime/ssidEAP-AKA.conf  | 16 ----
 autotests/testEAP-AKA/connection_test.py      | 75 -------------------
 autotests/testEAP-AKA/hw.conf                 |  8 --
 autotests/testEAP-AKA/sim.db                  |  1 -
 autotests/testEAP-AKA/sim.eap_user            |  1 -
 autotests/testEAP-AKA/sim_keys.conf           |  6 --
 autotests/testEAP-AKA/ssidEAP-AKA.8021x       |  5 --
 autotests/testEAP-AKA/ssidEAP-AKA.conf        | 16 ----
 autotests/testEAP-SIM/connection_test.py      | 74 ------------------
 autotests/testEAP-SIM/hw.conf                 |  8 --
 autotests/testEAP-SIM/sim.db                  |  1 -
 autotests/testEAP-SIM/sim.eap_user            |  1 -
 autotests/testEAP-SIM/sim_keys.conf           |  4 -
 autotests/testEAP-SIM/ssidEAP-SIM.8021x       |  5 --
 autotests/testEAP-SIM/ssidEAP-SIM.conf        | 16 ----
 21 files changed, 319 deletions(-)
 delete mode 100644 autotests/testEAP-AKA-prime/connection_test.py
 delete mode 100644 autotests/testEAP-AKA-prime/hw.conf
 delete mode 100644 autotests/testEAP-AKA-prime/sim.db
 delete mode 100644 autotests/testEAP-AKA-prime/sim.eap_user
 delete mode 100644 autotests/testEAP-AKA-prime/sim_keys.conf
 delete mode 100644 autotests/testEAP-AKA-prime/ssidEAP-AKA.8021x
 delete mode 100644 autotests/testEAP-AKA-prime/ssidEAP-AKA.conf
 delete mode 100644 autotests/testEAP-AKA/connection_test.py
 delete mode 100644 autotests/testEAP-AKA/hw.conf
 delete mode 100644 autotests/testEAP-AKA/sim.db
 delete mode 100644 autotests/testEAP-AKA/sim.eap_user
 delete mode 100644 autotests/testEAP-AKA/sim_keys.conf
 delete mode 100644 autotests/testEAP-AKA/ssidEAP-AKA.8021x
 delete mode 100644 autotests/testEAP-AKA/ssidEAP-AKA.conf
 delete mode 100644 autotests/testEAP-SIM/connection_test.py
 delete mode 100644 autotests/testEAP-SIM/hw.conf
 delete mode 100644 autotests/testEAP-SIM/sim.db
 delete mode 100644 autotests/testEAP-SIM/sim.eap_user
 delete mode 100644 autotests/testEAP-SIM/sim_keys.conf
 delete mode 100644 autotests/testEAP-SIM/ssidEAP-SIM.8021x
 delete mode 100644 autotests/testEAP-SIM/ssidEAP-SIM.conf
autotests/testEAP-AKA-prime/connection_test.py deleted +0 -61
deleted file mode 100644
index 8367022c..00000000
@@ -1,61 +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
-
-class Test(unittest.TestCase):
-
-    def test_connection_success(self):
-        auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
-
-        wd = IWD()
-
-        devices = wd.list_devices(1)
-        device = devices[0]
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        device.scan()
-
-        condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition)
-
-        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)
-
-        try:
-                ordered_network.network_object.connect()
-        except:
-                auth.stop()
-                raise
-
-        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)
-
-        auth.stop()
-    @classmethod
-    def setUpClass(cls):
-        IWD.copy_to_storage('ssidEAP-AKA.8021x')
-
-    @classmethod
-    def tearDownClass(cls):
-        IWD.clear_storage()
-
-if __name__ == '__main__':
-    unittest.main(exit=True)
autotests/testEAP-AKA-prime/hw.conf deleted +0 -8
deleted file mode 100644
index 61dcc807..00000000
@@ -1,8 +0,0 @@
-[SETUP]
-num_radios=2
-max_test_exec_interval_sec=40
-tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
-sim_keys=/tmp/sim_keys.conf
-
-[HOSTAPD]
-rad0=ssidEAP-AKA.conf
autotests/testEAP-AKA-prime/sim.db deleted +0 -1
deleted file mode 100644
index 526e4bb1..00000000
@@ -1 +0,0 @@
-32010000000000:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021
\ No newline at end of file
autotests/testEAP-AKA-prime/sim.eap_user deleted +0 -1
deleted file mode 100644
index 915c8fb0..00000000
@@ -1 +0,0 @@
-"632010000000000(a)example.com"	AKA'
\ No newline at end of file
autotests/testEAP-AKA-prime/sim_keys.conf deleted +0 -6
deleted file mode 100644
index fe7a6399..00000000
@@ -1,6 +0,0 @@
-[AKA]
-Identity=32010000000000(a)example.com
-KI=90dca4eda45b53cf0f12d7c9c3bc6a89
-OPC=cb9cccc4b9258e6dca4760379fb82581
-AMF=61df
-SQN=000000000021
autotests/testEAP-AKA-prime/ssidEAP-AKA.8021x deleted +0 -5
deleted file mode 100644
index 6e88da6b..00000000
@@ -1,5 +0,0 @@
-[Security]
-EAP-Method=AKA'
-
-[Settings]
-AutoConnect=false
autotests/testEAP-AKA-prime/ssidEAP-AKA.conf deleted +0 -16
deleted file mode 100644
index 01f01f45..00000000
@@ -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
autotests/testEAP-AKA/connection_test.py deleted +0 -75

75 lines not on this page · raw message

autotests/testEAP-AKA/hw.conf deleted +0 -8
deleted file mode 100644
index 61dcc807..00000000
@@ -1,8 +0,0 @@
-[SETUP]
-num_radios=2
-max_test_exec_interval_sec=40
-tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
-sim_keys=/tmp/sim_keys.conf
-
-[HOSTAPD]
-rad0=ssidEAP-AKA.conf
autotests/testEAP-AKA/sim.db deleted +0 -1
deleted file mode 100644
index 526e4bb1..00000000
@@ -1 +0,0 @@
-32010000000000:90dca4eda45b53cf0f12d7c9c3bc6a89:cb9cccc4b9258e6dca4760379fb82581:61df:000000000021
\ No newline at end of file
autotests/testEAP-AKA/sim.eap_user deleted +0 -1
deleted file mode 100644
index ef82f9f1..00000000
@@ -1 +0,0 @@
-"032010000000000(a)example.com"	AKA
autotests/testEAP-AKA/sim_keys.conf deleted +0 -6
deleted file mode 100644
index fe7a6399..00000000
@@ -1,6 +0,0 @@
-[AKA]
-Identity=32010000000000(a)example.com
-KI=90dca4eda45b53cf0f12d7c9c3bc6a89
-OPC=cb9cccc4b9258e6dca4760379fb82581
-AMF=61df
-SQN=000000000021
autotests/testEAP-AKA/ssidEAP-AKA.8021x deleted +0 -5
deleted file mode 100644
index 304eb276..00000000
@@ -1,5 +0,0 @@
-[Security]
-EAP-Method=AKA
-
-[Settings]
-AutoConnect=false
autotests/testEAP-AKA/ssidEAP-AKA.conf deleted +0 -16
deleted file mode 100644
index 01f01f45..00000000
@@ -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
autotests/testEAP-SIM/connection_test.py deleted +0 -74

74 lines not on this page · raw message

autotests/testEAP-SIM/hw.conf deleted +0 -8
deleted file mode 100644
index d725e38a..00000000
@@ -1,8 +0,0 @@
-[SETUP]
-num_radios=2
-max_test_exec_interval_sec=40
-tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf
-sim_keys=/tmp/sim_keys.conf
-
-[HOSTAPD]
-rad0=ssidEAP-SIM.conf
autotests/testEAP-SIM/sim.db deleted +0 -1
deleted file mode 100644
index 04f0ac8e..00000000
@@ -1 +0,0 @@
-32010000000000:D0D1D2D3D4D5D6D7:E1E2E3E4:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
\ No newline at end of file
autotests/testEAP-SIM/sim.eap_user deleted +0 -1
deleted file mode 100644
index 17f7e1ae..00000000
@@ -1 +0,0 @@
-"132010000000000(a)example.com"	SIM
autotests/testEAP-SIM/sim_keys.conf deleted +0 -4
deleted file mode 100644
index 000760ad..00000000
@@ -1,4 +0,0 @@
-[SIM]
-Identity=32010000000000(a)example.com
-Kc=d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7
-SRES=e1e2e3e4e1e2e3e4e1e2e3e4
autotests/testEAP-SIM/ssidEAP-SIM.8021x deleted +0 -5
deleted file mode 100644
index 1dcdbcb6..00000000
@@ -1,5 +0,0 @@
-[Security]
-EAP-Method=SIM
-
-[Settings]
-AutoConnect=false
autotests/testEAP-SIM/ssidEAP-SIM.conf deleted +0 -16
deleted file mode 100644
index 6071e301..00000000
@@ -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
Signature · 1 line
2.26.2
#6 lore raw

PATCH v2 6/6 auto-t: update EAP-PEAP-SIM test to use ofono

In reply to James Prestwood
---
 autotests/misc/secrets/eap-user-peap-sim.text | 2 +-
 autotests/testEAP-PEAP-SIM/connection_test.py | 6 ++++++
 autotests/testEAP-PEAP-SIM/hw.conf            | 4 +---
 autotests/testEAP-PEAP-SIM/sim.db             | 2 +-
 autotests/testEAP-PEAP-SIM/sim.eap_user       | 2 +-
 autotests/testEAP-PEAP-SIM/sim_keys.conf      | 4 ----
 6 files changed, 10 insertions(+), 10 deletions(-)
 delete mode 100644 autotests/testEAP-PEAP-SIM/sim_keys.conf
autotests/misc/secrets/eap-user-peap-sim.text +1 -1
index b3875a5c..76820116 100644
@@ -1,4 +1,4 @@
 # Phase 1 users
 *	PEAP
 # Phase 2
-"132010000000000(a)example.com"	SIM	[2]
+"112345678(a)phonesim.org"	SIM	[2]
autotests/testEAP-PEAP-SIM/connection_test.py +6 -0
index e4f03dc2..37398c15 100644
@@ -9,6 +9,7 @@ import iwd
 from iwd import IWD
 from iwd import NetworkType
 from hlrauc import AuthCenter
+from ofono import Ofono
 
 class Test(unittest.TestCase):
     def validate_connection(self, wd):
@@ -44,6 +45,11 @@ class Test(unittest.TestCase):
 
     def test_connection_success(self):
         auth = AuthCenter('/tmp/hlrauc.sock', '/tmp/sim.db')
+
+        ofono = Ofono()
+        ofono.enable_modem('/phonesim')
+        ofono.wait_for_sim_auth()
+
         wd = IWD(True)
 
         try:
autotests/testEAP-PEAP-SIM/hw.conf +1 -3
index f98429f4..659ba0e0 100644
@@ -1,9 +1,7 @@
 [SETUP]
 num_radios=2
 start_iwd=0
-max_test_exec_interval_sec=60
-tmpfs_extra_stuff=sim.eap_user:sim.db:sim_keys.conf:../misc/certs:../misc/secrets
-sim_keys=/tmp/sim_keys.conf
+sim_keys=ofono
 
 [HOSTAPD]
 rad0=ssidEAP-PEAP-SIM.conf
autotests/testEAP-PEAP-SIM/sim.db +1 -1
index b7f51e66..fbf79786 100644
@@ -1 +1 @@
-32010000000000:D0D1D2D3D4D5D6D7:E1E2E3E4:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
+12345678:673fb8cd35f98800:1fb1e3b5:DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
autotests/testEAP-PEAP-SIM/sim.eap_user +1 -1
index 17f7e1ae..dabb81a8 100644
@@ -1 +1 @@
-"132010000000000(a)example.com"	SIM
+"112345678(a)phonesim.org"	SIM
autotests/testEAP-PEAP-SIM/sim_keys.conf deleted +0 -4
deleted file mode 100644
index 000760ad..00000000
@@ -1,4 +0,0 @@
-[SIM]
-Identity=32010000000000(a)example.com
-Kc=d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7d0d1d2d3d4d5d6d7
-SRES=e1e2e3e4e1e2e3e4e1e2e3e4
Signature · 1 line
2.26.2